fix: exclude files from being counted in 'Notes' view (#2062)

This commit is contained in:
Mo
2022-11-28 11:11:55 -06:00
committed by GitHub
parent 4181a4cca0
commit 2b0c9b188c
2 changed files with 17 additions and 2 deletions

View File

@@ -289,13 +289,13 @@ export class ItemManager
}
public allCountableNotesCount(): number {
return this.tagItemsIndex.allCountableItemsCount()
return this.tagItemsIndex.allCountableNotesCount()
}
public countableNotesForTag(tag: Models.SNTag | Models.SmartView): number {
if (tag instanceof Models.SmartView) {
if (tag.uuid === Models.SystemViewId.AllNotes) {
return this.tagItemsIndex.allCountableItemsCount()
return this.tagItemsIndex.allCountableNotesCount()
}
throw Error('countableItemsForTag is not meant to be used for smart views.')