fix: smart tags
This commit is contained in:
@@ -13,7 +13,6 @@ export enum NoteSortKey {
|
||||
|
||||
export function notePassesFilter(
|
||||
note: SNNote,
|
||||
selectedTag: SNTag,
|
||||
showArchived: boolean,
|
||||
hidePinned: boolean,
|
||||
filterText: string
|
||||
@@ -21,17 +20,6 @@ export function notePassesFilter(
|
||||
|
||||
let canShowArchived = showArchived;
|
||||
const canShowPinned = !hidePinned;
|
||||
if (!selectedTag.isTrashTag && note.trashed) {
|
||||
return false;
|
||||
}
|
||||
const isSmartTag = selectedTag.isSmartTag();
|
||||
if (isSmartTag) {
|
||||
canShowArchived = (
|
||||
canShowArchived ||
|
||||
selectedTag.isArchiveTag ||
|
||||
selectedTag.isTrashTag
|
||||
);
|
||||
}
|
||||
if (
|
||||
(note.archived && !canShowArchived) ||
|
||||
(note.pinned && !canShowPinned)
|
||||
@@ -79,4 +67,4 @@ function stringIsUuid(text: string) {
|
||||
);
|
||||
// eslint-disable-next-line no-unneeded-ternary
|
||||
return matches ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user