mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 09:58:32 +02:00
don't show hidden notes in search results
This commit is contained in:
parent
1347d3fcc2
commit
0e01c19414
@ -88,6 +88,10 @@ function findResultsWithExpression(expression, searchContext) {
|
||||
throw new Error(`Can't find note path for note ${JSON.stringify(note.getPojo())}`);
|
||||
}
|
||||
|
||||
if (notePathArray.includes("hidden")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new SearchResult(notePathArray);
|
||||
})
|
||||
.filter(note => !!note);
|
||||
@ -176,8 +180,7 @@ function searchNotesForAutocomplete(query) {
|
||||
fuzzyAttributeSearch: true
|
||||
});
|
||||
|
||||
const allSearchResults = findResultsWithQuery(query, searchContext)
|
||||
.filter(res => !res.notePathArray.includes("hidden"));
|
||||
const allSearchResults = findResultsWithQuery(query, searchContext);
|
||||
|
||||
const trimmed = allSearchResults.slice(0, 200);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user