Search: Check if filename matches

Fixes #95

We really need search highlighting to showcase why an item matched while
searching. Additionally, soon we may need to give the user control over
what all should be searched.
This commit is contained in:
Vishesh Handa
2020-04-20 00:37:48 +02:00
parent f84642207d
commit 3c3c49e099

View File

@ -69,6 +69,9 @@ class NoteSearchDelegate extends SearchDelegate<Note> {
if (note.title.toLowerCase().contains(q)) {
return true;
}
if (note.fileName.toLowerCase().contains(q)) {
return true;
}
return note.body.toLowerCase().contains(q);
}).toList();