Simplification

This commit is contained in:
M66B 2022-02-19 08:28:16 +01:00
parent ea7e9c1f7d
commit d415a48d86
1 changed files with 8 additions and 11 deletions

View File

@ -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,15 +3273,12 @@ 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) {
Log.i(folder.name + " remaining=" + uids.size()); Log.i(folder.name + " remaining=" + uids.size());
@ -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)