feat: persist tags expanded state

This commit is contained in:
Mo
2022-02-08 22:27:00 -06:00
parent dcf07f70fd
commit 0c3d1fce0c
4 changed files with 18 additions and 9 deletions

View File

@@ -267,6 +267,12 @@ export class TagsState {
this.selected_ = tag;
}
public setExpanded(tag: SNTag, exapnded: boolean) {
this.application.changeAndSaveItem<TagMutator>(tag.uuid, (mutator) => {
mutator.expanded = exapnded;
});
}
public get selectedUuid(): UuidString | undefined {
return this.selected_?.uuid;
}