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:
parent
8c66a2f835
commit
5245191900
@ -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() {
|
put("doRefreshRemote", listener, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
@ -492,14 +492,14 @@ public class MessagingController implements Runnable {
|
|||||||
localFolders = localStore.getPersonalNamespaces(false);
|
localFolders = localStore.getPersonalNamespaces(false);
|
||||||
Folder[] folderArray = localFolders.toArray(EMPTY_FOLDER_ARRAY);
|
Folder[] folderArray = localFolders.toArray(EMPTY_FOLDER_ARRAY);
|
||||||
|
|
||||||
for (MessagingListener l : getListeners()) {
|
for (MessagingListener l : getListeners(listener)) {
|
||||||
l.listFolders(account, folderArray);
|
l.listFolders(account, folderArray);
|
||||||
}
|
}
|
||||||
for (MessagingListener l : getListeners()) {
|
for (MessagingListener l : getListeners(listener)) {
|
||||||
l.listFoldersFinished(account);
|
l.listFoldersFinished(account);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
for (MessagingListener l : getListeners()) {
|
for (MessagingListener l : getListeners(listener)) {
|
||||||
l.listFoldersFailed(account, "");
|
l.listFoldersFailed(account, "");
|
||||||
}
|
}
|
||||||
addErrorMessage(account, null, e);
|
addErrorMessage(account, null, e);
|
||||||
|
Loading…
Reference in New Issue
Block a user