mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12:15 -05:00
on search, only fire one start event and one end event
This commit is contained in:
parent
6c383256a2
commit
a53e9d1b89
@ -679,10 +679,10 @@ public class MessagingController implements Runnable
|
||||
Preferences prefs = Preferences.getPreferences(mApplication.getApplicationContext());
|
||||
Account[] accounts = prefs.getAccounts();
|
||||
|
||||
listener.listLocalMessagesStarted(account, null);
|
||||
for (final Account account : accounts)
|
||||
{
|
||||
|
||||
listener.listLocalMessagesStarted(account, null);
|
||||
|
||||
MessageRetrievalListener retrievalListener = new MessageRetrievalListener()
|
||||
{
|
||||
@ -708,13 +708,16 @@ public class MessagingController implements Runnable
|
||||
LocalStore localStore = (LocalStore)Store.getInstance(account.getLocalStoreUri(), mApplication);
|
||||
|
||||
localStore.searchForMessages(retrievalListener, query);
|
||||
listener.listLocalMessagesFinished(account, null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
listener.listLocalMessagesFailed(account, null, e.getMessage());
|
||||
addErrorMessage(account, e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
listener.listLocalMessagesFinished(account, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -2183,7 +2186,7 @@ public class MessagingController implements Runnable
|
||||
}
|
||||
if (K9.DEBUG)
|
||||
{
|
||||
Log.d(K9.LOG_TAG, "processPendingExpunge: folder = " + folder );
|
||||
Log.d(K9.LOG_TAG, "processPendingExpunge: folder = " + folder);
|
||||
}
|
||||
|
||||
Store remoteStore = Store.getInstance(account.getStoreUri(), mApplication);
|
||||
@ -2202,7 +2205,7 @@ public class MessagingController implements Runnable
|
||||
remoteFolder.expunge();
|
||||
if (K9.DEBUG)
|
||||
{
|
||||
Log.d(K9.LOG_TAG, "processPendingExpunge: complete for folder = " + folder );
|
||||
Log.d(K9.LOG_TAG, "processPendingExpunge: complete for folder = " + folder);
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user