From 5245191900f4568a068a1f35160d3d122c325886 Mon Sep 17 00:00:00 2001 From: cketti Date: Sun, 18 Mar 2012 22:43:47 +0100 Subject: [PATCH] Notify the listener provided as argument to doRefreshRemote() With this change pressing "Refresh folders" in ChooseFolder actually refreshes the folder list. --- src/com/fsck/k9/controller/MessagingController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index 33acd96f1..290679e86 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -449,7 +449,7 @@ public class MessagingController implements Runnable { } } - private void doRefreshRemote(final Account account, MessagingListener listener) { + private void doRefreshRemote(final Account account, final MessagingListener listener) { put("doRefreshRemote", listener, new Runnable() { @Override public void run() { @@ -492,14 +492,14 @@ public class MessagingController implements Runnable { localFolders = localStore.getPersonalNamespaces(false); Folder[] folderArray = localFolders.toArray(EMPTY_FOLDER_ARRAY); - for (MessagingListener l : getListeners()) { + for (MessagingListener l : getListeners(listener)) { l.listFolders(account, folderArray); } - for (MessagingListener l : getListeners()) { + for (MessagingListener l : getListeners(listener)) { l.listFoldersFinished(account); } } catch (Exception e) { - for (MessagingListener l : getListeners()) { + for (MessagingListener l : getListeners(listener)) { l.listFoldersFailed(account, ""); } addErrorMessage(account, null, e);