Simplification

pull/194/merge
M66B 3 years ago
parent ea7e9c1f7d
commit d415a48d86

@ -3260,10 +3260,10 @@ class Core {
stats.flags_ms = (SystemClock.elapsedRealtime() - fetch); stats.flags_ms = (SystemClock.elapsedRealtime() - fetch);
Log.i(folder.name + " remote fetched=" + stats.flags_ms + " ms"); Log.i(folder.name + " remote fetched=" + stats.flags_ms + " ms");
try { for (int i = 0; i < imessages.length; i++) {
for (int i = 0; i < imessages.length; i++) { state.ensureRunning("Sync/IMAP/check");
state.ensureRunning("Sync/IMAP/check");
try {
long uid = ifolder.getUID(imessages[i]); long uid = ifolder.getUID(imessages[i]);
EntityMessage message = db.message().getMessageByUid(folder.id, uid); EntityMessage message = db.message().getMessageByUid(folder.id, uid);
ids[i] = (message == null ? null : message.id); ids[i] = (message == null ? null : message.id);
@ -3273,14 +3273,11 @@ class Core {
break; break;
} else } else
uids.remove(uid); uids.remove(uid);
} } catch (Throwable ex) {
} catch (Throwable ex) {
if (ex instanceof OperationCanceledException)
Log.i(ex);
else
Log.w(ex); Log.w(ex);
modified = true; modified = true;
modseq = null; modseq = null;
}
} }
if (uids.size() > 0) { if (uids.size() > 0) {
@ -5767,7 +5764,7 @@ class Core {
join(thread); join(thread);
} }
void ensureRunning(String reason) { void ensureRunning(String reason) throws OperationCanceledException {
if (!recoverable && unrecoverable != null) if (!recoverable && unrecoverable != null)
throw new OperationCanceledExceptionEx(reason, unrecoverable); throw new OperationCanceledExceptionEx(reason, unrecoverable);
if (!running) if (!running)

Loading…
Cancel
Save