From 0b49b22af033d8ab8374ab859a2d29cc63baba6d Mon Sep 17 00:00:00 2001 From: cketti Date: Tue, 21 Jan 2020 17:13:49 +0100 Subject: [PATCH] Remove unused callback MessagingListener.emptyTrashCompleted() --- .../java/com/fsck/k9/controller/MessagingController.java | 5 +++-- .../main/java/com/fsck/k9/controller/MessagingListener.java | 2 -- .../java/com/fsck/k9/controller/SimpleMessagingListener.java | 4 ---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java b/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java index 8a5eb6bd4..cafa53cba 100644 --- a/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java +++ b/app/core/src/main/java/com/fsck/k9/controller/MessagingController.java @@ -2198,7 +2198,8 @@ public class MessagingController { LocalFolder localFolder = null; try { LocalStore localStore = localStoreProvider.getInstance(account); - localFolder = localStore.getFolder(account.getTrashFolder()); + String trashFolderServerId = account.getTrashFolder(); + localFolder = localStore.getFolder(trashFolderServerId); localFolder.open(); boolean isTrashLocalOnly = isTrashLocalOnly(account); @@ -2209,7 +2210,7 @@ public class MessagingController { } for (MessagingListener l : getListeners()) { - l.emptyTrashCompleted(account); + l.folderStatusChanged(account, trashFolderServerId, 0); } if (!isTrashLocalOnly) { diff --git a/app/core/src/main/java/com/fsck/k9/controller/MessagingListener.java b/app/core/src/main/java/com/fsck/k9/controller/MessagingListener.java index 511bab6e4..d0159bd43 100644 --- a/app/core/src/main/java/com/fsck/k9/controller/MessagingListener.java +++ b/app/core/src/main/java/com/fsck/k9/controller/MessagingListener.java @@ -39,8 +39,6 @@ public interface MessagingListener { void sendPendingMessagesCompleted(Account account); void sendPendingMessagesFailed(Account account); - void emptyTrashCompleted(Account account); - void folderStatusChanged(Account account, String folderServerId, int unreadMessageCount); void systemStatusChanged(); diff --git a/app/core/src/main/java/com/fsck/k9/controller/SimpleMessagingListener.java b/app/core/src/main/java/com/fsck/k9/controller/SimpleMessagingListener.java index 1ee0601cd..250ee157c 100644 --- a/app/core/src/main/java/com/fsck/k9/controller/SimpleMessagingListener.java +++ b/app/core/src/main/java/com/fsck/k9/controller/SimpleMessagingListener.java @@ -91,10 +91,6 @@ public abstract class SimpleMessagingListener implements MessagingListener { public void sendPendingMessagesFailed(Account account) { } - @Override - public void emptyTrashCompleted(Account account) { - } - @Override public void folderStatusChanged(Account account, String folderServerId, int unreadMessageCount) { }