aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/services
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-14 20:43:54 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-14 20:43:54 +0100
commitbae741875690400efac68ed49f2ead405ec2ed53 (patch)
treefcff87d7f105744d5f9f096dfc4160d1573db7ea /src/eu/siacs/conversations/services
parent29e128513d3abdaae829e99ec9dfab1b0a0d84cd (diff)
fixed logic bug with cleaning of presences
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 438150ac..c7f1bdb7 100644
--- a/src/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/eu/siacs/conversations/services/XmppConnectionService.java
@@ -34,6 +34,7 @@ import eu.siacs.conversations.utils.OnPhoneContactsLoadedListener;
import eu.siacs.conversations.utils.PhoneHelper;
import eu.siacs.conversations.utils.UIHelper;
import eu.siacs.conversations.xml.Element;
+import eu.siacs.conversations.xmpp.OnBindListener;
import eu.siacs.conversations.xmpp.OnIqPacketReceived;
import eu.siacs.conversations.xmpp.OnMessagePacketReceived;
import eu.siacs.conversations.xmpp.OnPresencePacketReceived;
@@ -186,7 +187,6 @@ public class XmppConnectionService extends Service {
accountChangedListener.onAccountListChangedListener();
}
if (account.getStatus() == Account.STATUS_ONLINE) {
- databaseBackend.clearPresences(account);
if (account.getXmppConnection().hasFeatureRosterManagment()) {
updateRoster(account, null);
}
@@ -541,6 +541,13 @@ public class XmppConnectionService extends Service {
}
}
});
+ connection.setOnBindListener(new OnBindListener() {
+
+ @Override
+ public void onBind(Account account) {
+ databaseBackend.clearPresences(account);
+ }
+ });
return connection;
}