1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Notify the listener provided as argument to doRefreshRemote()

With this change pressing "Refresh folders" in ChooseFolder actually
refreshes the folder list.
This commit is contained in:
cketti 2012-03-18 22:43:47 +01:00
parent 8c66a2f835
commit 5245191900

View File

@ -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);