mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Fixed local search
This commit is contained in:
parent
416712cb1c
commit
de21a65935
1 changed files with 4 additions and 1 deletions
|
@ -101,6 +101,7 @@ public class ViewModelBrowse extends ViewModel {
|
|||
boolean match = false;
|
||||
String find = search.toLowerCase();
|
||||
EntityMessage message = db.message().getMessage(messages.get(i));
|
||||
String body = (message.content ? message.read(context) : null);
|
||||
|
||||
if (message.from != null)
|
||||
for (int j = 0; j < message.from.length && !match; j++)
|
||||
|
@ -114,13 +115,15 @@ public class ViewModelBrowse extends ViewModel {
|
|||
match = message.subject.toLowerCase().contains(find);
|
||||
|
||||
if (!match && message.content)
|
||||
match = message.read(context).toLowerCase().contains(find);
|
||||
match = body.toLowerCase().contains(find);
|
||||
|
||||
if (match) {
|
||||
matched++;
|
||||
message.id = null;
|
||||
message.ui_found = true;
|
||||
message.id = db.message().insertMessage(message);
|
||||
if (message.content)
|
||||
message.write(context, body);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue