mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Fix notifications for messages that arrive via IDLE
This commit is contained in:
parent
694ba471d4
commit
9971b9e8c5
@ -3504,7 +3504,6 @@ public class MessagingController implements Runnable {
|
||||
|
||||
public Pusher setupPushing(final Account account)
|
||||
{
|
||||
|
||||
Pusher pusher = pushers.get(account);
|
||||
if (pusher != null)
|
||||
{
|
||||
@ -3750,23 +3749,15 @@ public class MessagingController implements Runnable {
|
||||
remoteFolder.open(OpenMode.READ_WRITE);
|
||||
|
||||
int newCount = downloadMessages(account, remoteFolder, localFolder, messages);
|
||||
int unreadCount = 0;
|
||||
for (Message message : messages)
|
||||
{
|
||||
if (message.isSet(Flag.SEEN) == false)
|
||||
{
|
||||
unreadCount++;
|
||||
}
|
||||
}
|
||||
localFolder.setLastPush(System.currentTimeMillis());
|
||||
localFolder.setStatus(null);
|
||||
|
||||
int unreadMessageCount = account.getUnreadMessageCount(mApplication, mApplication);
|
||||
if (doNotify && unreadCount > 0)
|
||||
if (doNotify && newCount > 0 && unreadMessageCount > 0)
|
||||
{
|
||||
notifyAccount(mApplication, account, newCount, unreadMessageCount);
|
||||
}
|
||||
if (unreadCount == 0)
|
||||
if (unreadMessageCount == 0)
|
||||
{
|
||||
notifyAccount(mApplication, account, newCount, unreadMessageCount);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user