From 6cce237c4cb685c8f3d9e5d08e75550d612087c6 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 3 Sep 2020 15:50:33 +0200 Subject: [PATCH] Refactoring --- app/src/main/java/eu/faircode/email/Core.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 56f3c32dc3..301a29ef3b 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -2475,13 +2475,14 @@ class Core { for (int j = isub.length - 1; j >= 0 && state.isRunning() && state.isRecoverable(); j--) try { - if (ids[from + j] != null) - if (downloadMessage( + if (ids[from + j] != null) { + boolean fetched = downloadMessage( context, account, folder, istore, ifolder, (MimeMessage) isub[j], ids[from + j], - state, stats)) + state, stats); + if (fetched) if ((++downloaded % DOWNLOAD_YIELD_COUNT) == 0) try { Log.i(folder.name + " yield downloaded=" + downloaded); @@ -2489,6 +2490,7 @@ class Core { } catch (InterruptedException ex) { Log.w(ex); } + } } catch (FolderClosedException ex) { throw ex; } catch (Throwable ex) {