1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00

Fixed ACTION_REFRESH_OBSERVER broadcast sending

searchStats seems unreachable so broadcast is now sent from
folderStatusChanged and also contains the account and folder name as
extra parameters.
This commit is contained in:
Roee Shlomo 2012-08-17 17:18:00 +03:00
parent 5b4d2806ab
commit a4d1f78dbd

View File

@ -566,7 +566,15 @@ public class K9 extends Application {
@Override
public void folderStatusChanged(Account account, String folderName,
int unreadMessageCount) {
updateUnreadWidget();
updateUnreadWidget();
// let observers know a change occurred
Intent intent = new Intent(K9.Intents.EmailReceived.ACTION_REFRESH_OBSERVER, null);
intent.putExtra(K9.Intents.EmailReceived.EXTRA_ACCOUNT, account.getDescription());
intent.putExtra(K9.Intents.EmailReceived.EXTRA_FOLDER, folderName);
K9.this.sendBroadcast(intent);
}
@Override