From 40e19a242c7cf8f60b5a9106ac1283a64421d0cb Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 11 Jun 2020 19:21:50 +0200 Subject: [PATCH] Simplification --- app/src/main/java/eu/faircode/email/Core.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 1fb82f26af..605c77b277 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -414,14 +414,6 @@ class Core { continue; } - if (op.tries >= TOTAL_RETRY_MAX) { - // Giving up - op.cleanup(context); - db.operation().deleteOperation(op.id); - ops.remove(op); - continue; - } - try { db.beginTransaction(); @@ -436,7 +428,8 @@ class Core { db.endTransaction(); } - if (ex instanceof OutOfMemoryError || + if (op.tries >= TOTAL_RETRY_MAX || + ex instanceof OutOfMemoryError || ex instanceof MessageRemovedException || ex instanceof MessageRemovedIOException || ex instanceof FileNotFoundException ||