make sure unread count is initialized as 0. fixes #1270

This commit is contained in:
Daniel Gultsch 2015-07-03 22:08:23 +02:00
parent d30fb6f0a1
commit 2fbeb0bbb2
1 changed files with 2 additions and 1 deletions

View File

@ -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() {