|
|
@ -64,7 +64,6 @@ public class ViewModelBrowse extends ViewModel {
|
|
|
|
private int pageSize;
|
|
|
|
private int pageSize;
|
|
|
|
|
|
|
|
|
|
|
|
int local = 0;
|
|
|
|
int local = 0;
|
|
|
|
int matched = 0;
|
|
|
|
|
|
|
|
List<Long> messages = null;
|
|
|
|
List<Long> messages = null;
|
|
|
|
IMAPStore istore = null;
|
|
|
|
IMAPStore istore = null;
|
|
|
|
IMAPFolder ifolder = null;
|
|
|
|
IMAPFolder ifolder = null;
|
|
|
@ -84,13 +83,6 @@ public class ViewModelBrowse extends ViewModel {
|
|
|
|
currentState.error = false;
|
|
|
|
currentState.error = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
boolean isEmpty() {
|
|
|
|
|
|
|
|
final State state = currentState;
|
|
|
|
|
|
|
|
if (state == null)
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
return (state.matched == 0 && (state.imessages == null || state.imessages.length == 0));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void load() throws MessagingException, IOException {
|
|
|
|
void load() throws MessagingException, IOException {
|
|
|
|
final State state = currentState;
|
|
|
|
final State state = currentState;
|
|
|
|
if (state == null || state.error)
|
|
|
|
if (state == null || state.error)
|
|
|
@ -136,10 +128,8 @@ public class ViewModelBrowse extends ViewModel {
|
|
|
|
if (!match && message.content)
|
|
|
|
if (!match && message.content)
|
|
|
|
match = body.toLowerCase().contains(find);
|
|
|
|
match = body.toLowerCase().contains(find);
|
|
|
|
|
|
|
|
|
|
|
|
if (match) {
|
|
|
|
if (match)
|
|
|
|
state.matched++;
|
|
|
|
|
|
|
|
db.message().setMessageFound(message.account, message.thread);
|
|
|
|
db.message().setMessageFound(message.account, message.thread);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|