aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-29 20:29:03 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-29 20:29:03 +0100
commite8290d52b1e71dd8ab2a1d50e9a5d96a7f9a204d (patch)
treef8187bfd1550fbacf6792633c35a621260934a4f /src/eu/siacs/conversations/services
parent38efb84690f5ed46ad34b0a5cb27e63da73394bd (diff)
finally fixed #notificationgate
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r--src/eu/siacs/conversations/services/XmppConnectionService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java
index 57a028e7..2a8ee4a7 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -85,6 +85,7 @@ public class XmppConnectionService extends Service {
private List<Conversation> conversations = null;
public OnConversationListChangedListener convChangedListener = null;
+ private int convChangedListenerCount = 0;
private OnAccountListChangedListener accountChangedListener = null;
private OnTLSExceptionReceived tlsException = null;
@@ -1009,10 +1010,16 @@ public class XmppConnectionService extends Service {
public void setOnConversationListChangedListener(
OnConversationListChangedListener listener) {
this.convChangedListener = listener;
+ this.convChangedListenerCount++;
+ Log.d(LOGTAG,"registered on conv changed in backend ("+convChangedListenerCount+")");
}
public void removeOnConversationListChangedListener() {
- this.convChangedListener = null;
+ this.convChangedListenerCount--;
+ Log.d(LOGTAG,"someone on conv changed listener removed listener ("+convChangedListenerCount+")");
+ if (this.convChangedListenerCount==0) {
+ this.convChangedListener = null;
+ }
}
public void setOnAccountListChangedListener(