From a7586ec10fc234766b53b33375004f179ac18a95 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 27 Jul 2020 16:54:03 +0200 Subject: [PATCH] Purge local --- app/src/main/java/eu/faircode/email/Core.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 8a2a7f716f..e56c9fe776 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -306,7 +306,7 @@ class Core { break; case EntityOperation.PURGE: - onPurgeFolder(context, jargs, folder, (POP3Folder) ifolder); + onPurgeFolder(context, folder); break; default: @@ -1768,10 +1768,13 @@ class Core { } finally { int count = ifolder.getMessageCount(); db.folder().setFolderTotal(folder.id, count < 0 ? null : count); + + // Delete local, hidden messages + onPurgeFolder(context, folder); } } - private static void onPurgeFolder(Context context, JSONArray jargs, EntityFolder folder, POP3Folder ifolder) throws MessagingException { + private static void onPurgeFolder(Context context, EntityFolder folder) { DB db = DB.getInstance(context); try { db.beginTransaction();