diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2015-07-03 22:08:23 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2015-07-03 22:36:04 +0200 |
commit | a2bab9c5649c8a0c0ff2331d2ec3294123d640ec (patch) | |
tree | a97b5874f52ed699687ef52f6616b6953790f57e /src | |
parent | 097bdf1a3ea4a1821b18eeffebaff4bd4d395817 (diff) |
make sure unread count is initialized as 0. fixes #1270
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 0a264dd1..17c344c2 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -233,7 +233,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa private MessageArchiveService mMessageArchiveService = new MessageArchiveService(this); private OnConversationUpdate mOnConversationUpdate = null; private int convChangedListenerCount = 0; - private int unreadCount = 0; + private int unreadCount = -1; private OnAccountUpdate mOnAccountUpdate = null; private OnStatusChanged statusListener = new OnStatusChanged() { @@ -602,6 +602,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa this.pm = (PowerManager) getSystemService(Context.POWER_SERVICE); this.wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,"XmppConnectionService"); toggleForegroundService(); + updateUnreadCountBadge(); } public void toggleForegroundService() { |