From 35f19abc9fea7f9ba90437c78463fb9ea1d1eb90 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 1 Dec 2010 06:04:22 +0000 Subject: [PATCH] Improve the "Do what I mean" nature of "Empty trash" - it now syncs the trash folder after deletions to clear out local records of deleted messages and does a compact operation on the local store. --- src/com/fsck/k9/controller/MessagingController.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index ebaa39d0c..0dfef727d 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -4067,6 +4067,13 @@ public class MessagingController implements Runnable { remoteFolder.expunge(); } + + // When we empty trash, we need to actually synchronize the folder + // or local deletes will never get cleaned up + synchronizeFolder(account, remoteFolder, true, 0, null); + compact(account, null); + + } } finally