diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-07-18 15:35:31 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-07-18 15:35:31 +0200 |
commit | 4307b1de723a5ec28610580ad04bb7cb327b264c (patch) | |
tree | 0493a9df396a565afa903ee74e1334533ac1acf6 /src/eu/siacs/conversations/services | |
parent | 6b74c0594e95dcedfdbeeb33ef7bdd8b52c1093e (diff) |
notify ui on roster changes
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 15 |
1 files changed, 15 insertions, 0 deletions
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<Conversation> 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) { |