Small improvement

pull/199/head
M66B 4 years ago
parent 1e4e066d39
commit fbd526ccc7

@ -241,8 +241,9 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
db.beginTransaction(); db.beginTransaction();
for (; state.index < state.ids.size() && found < pageSize && !state.destroyed; state.index++) { for (; state.index < state.ids.size() && found < pageSize && !state.destroyed; state.index++) {
found++; long id = state.ids.get(state.index);
db.message().setMessageFound(state.ids.get(state.index)); found += db.message().setMessageFound(id);
Log.i("Boundary matched=" + id + " found=" + found);
} }
db.setTransactionSuccessful(); db.setTransactionSuccessful();
@ -321,9 +322,8 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
} }
if (matched) { if (matched) {
found++; found += db.message().setMessageFound(match.id);
Log.i("Boundary matched=" + match.id); Log.i("Boundary matched=" + match.id + " found=" + found);
db.message().setMessageFound(match.id);
} }
} }
} }
@ -537,9 +537,12 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
(IMAPStore) state.iservice.getStore(), state.ifolder, (MimeMessage) isub[j], (IMAPStore) state.iservice.getStore(), state.ifolder, (MimeMessage) isub[j],
true, true, true, true,
rules, astate, null); rules, astate, null);
found++; if (message != null) // SQLiteConstraintException
if (message != null && criteria != null /* browsed */) if (criteria == null)
db.message().setMessageFound(message.id); found++; // browsed
else
found += db.message().setMessageFound(message.id);
Log.i("Boundary matched=" + (message == null ? null : message.id) + " found=" + found);
} catch (MessageRemovedException ex) { } catch (MessageRemovedException ex) {
Log.w(browsable.name + " boundary server", ex); Log.w(browsable.name + " boundary server", ex);
} catch (FolderClosedException ex) { } catch (FolderClosedException ex) {

Loading…
Cancel
Save