Skip to content
This repository has been archived by the owner on Jun 15, 2022. It is now read-only.

Commit

Permalink
feat: hide protected notes from search results
Browse files Browse the repository at this point in the history
  • Loading branch information
antsgar committed Feb 19, 2021
1 parent c30b676 commit 6f585ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/screens/Notes/utils.ts
Expand Up @@ -20,7 +20,11 @@ export function notePassesFilter(
) {
let canShowArchived = showArchived;
const canShowPinned = !hidePinned;
if ((note.archived && !canShowArchived) || (note.pinned && !canShowPinned)) {
if (
(note.archived && !canShowArchived) ||
(note.pinned && !canShowPinned) ||
(note.protected && filterText)
) {
return false;
}
return noteMatchesQuery(note, filterText);
Expand Down

0 comments on commit 6f585ed

Please sign in to comment.