Revert "feat: ability to favorite tags (#1852)"

This reverts commit 4f3b258363.
This commit is contained in:
Mo
2022-10-20 13:00:22 -05:00
parent 8d7d577b1c
commit 5d202a823e
7 changed files with 27 additions and 81 deletions

View File

@@ -35,7 +35,6 @@ export class NavigationController
{
tags: SNTag[] = []
smartViews: SmartView[] = []
starredTags: SNTag[] = []
allNotesCount_ = 0
selectedUuid: AnyTag['uuid'] | undefined = undefined
selected_: AnyTag | undefined
@@ -67,7 +66,6 @@ export class NavigationController
makeObservable(this, {
tags: observable,
starredTags: observable,
smartViews: observable.ref,
hasAtLeastOneFolder: computed,
allNotesCount_: observable,
@@ -113,7 +111,7 @@ export class NavigationController
this.application.streamItems([ContentType.Tag, ContentType.SmartView], ({ changed, removed }) => {
runInAction(() => {
this.tags = this.application.items.getDisplayableTags()
this.starredTags = this.tags.filter((tag) => tag.starred)
this.smartViews = this.application.items.getSmartViews()
const currentSelectedTag = this.selected_
@@ -478,14 +476,6 @@ export class NavigationController
.catch(console.error)
}
public async setFavorite(tag: SNTag, favorite: boolean) {
return this.application.mutator
.changeAndSaveItem<TagMutator>(tag, (mutator) => {
mutator.starred = favorite
})
.catch(console.error)
}
public get editingTag(): SNTag | SmartView | undefined {
return this.editing_
}