mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
492c12483a
commit
419e4af5ea
|
@ -170,19 +170,21 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
|
||||||
private int load_device() {
|
private int load_device() {
|
||||||
DB db = DB.getInstance(context);
|
DB db = DB.getInstance(context);
|
||||||
|
|
||||||
|
if (messages == null) {
|
||||||
|
messages = db.message().getMessageIdsByFolder(folder);
|
||||||
|
Log.i("Boundary device folder=" + folder + " query=" + query + " messages=" + messages.size());
|
||||||
|
}
|
||||||
|
|
||||||
int found = 0;
|
int found = 0;
|
||||||
try {
|
try {
|
||||||
db.beginTransaction();
|
db.beginTransaction();
|
||||||
|
|
||||||
if (messages == null) {
|
|
||||||
messages = db.message().getMessageIdsByFolder(folder);
|
|
||||||
Log.i("Boundary device folder=" + folder + " query=" + query + " messages=" + messages.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = index; i < messages.size() && found < pageSize && !destroyed; i++) {
|
for (int i = index; i < messages.size() && found < pageSize && !destroyed; i++) {
|
||||||
index = i + 1;
|
index = i + 1;
|
||||||
|
|
||||||
EntityMessage message = db.message().getMessage(messages.get(i));
|
EntityMessage message = db.message().getMessage(messages.get(i));
|
||||||
|
if (message == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
boolean match = false;
|
boolean match = false;
|
||||||
if (query == null)
|
if (query == null)
|
||||||
|
|
Loading…
Reference in New Issue