From 4307b1de723a5ec28610580ad04bb7cb327b264c Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Fri, 18 Jul 2014 15:35:31 +0200 Subject: notify ui on roster changes --- .../conversations/services/XmppConnectionService.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/eu/siacs/conversations/services/XmppConnectionService.java') diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index dd4363f4..bbc9861a 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -105,6 +105,7 @@ public class XmppConnectionService extends Service { private OnConversationUpdate mOnConversationUpdate = null; private int convChangedListenerCount = 0; private OnAccountUpdate mOnAccountUpdate = null; + private OnRosterUpdate mOnRosterUpdate = null; private OnTLSExceptionReceived tlsException = null; public OnContactStatusChanged onContactStatusChanged = new OnContactStatusChanged() { @@ -917,6 +918,14 @@ public class XmppConnectionService extends Service { public void removeOnAccountListChangedListener() { this.mOnAccountUpdate = null; } + + public void setOnRosterUpdateListener(OnRosterUpdate listener) { + this.mOnRosterUpdate = listener; + } + + public void removeOnRosterUpdateListener() { + this.mOnRosterUpdate = null; + } public void connectMultiModeConversations(Account account) { List conversations = getConversations(); @@ -1261,6 +1270,12 @@ public class XmppConnectionService extends Service { mOnAccountUpdate.onAccountUpdate(); } } + + public void updateRosterUi() { + if (mOnRosterUpdate != null) { + mOnRosterUpdate.onRosterUpdate(); + } + } public Account findAccountByJid(String accountJid) { for (Account account : this.accounts) { -- cgit v1.2.3