update folder creation

pull/1652/head
gabrielburnworth 2020-01-03 12:17:39 -08:00
parent 781ac33b10
commit 271884f2d0
1 changed files with 3 additions and 1 deletions

View File

@ -65,10 +65,12 @@ export const reindexFolders = (i: ResourceIndex) => {
const allSequences = selectAllSequences(i);
const oldMeta = i.sequenceFolders.localMetaAttributes;
/** Open folder edit mode when adding a new folder (& not during init all). */
const editing = !!oldMeta[-1];
const localMetaAttributes: Record<number, FolderMeta> = {};
folders.map(x => {
localMetaAttributes[x.id] = {
...(oldMeta[x.id] || {}),
...(oldMeta[x.id] || { editing }),
sequences: [], // Clobber and re-init
};
});