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/ui/ContactDetailsActivity.java | |
parent | 6b74c0594e95dcedfdbeeb33ef7bdd8b52c1093e (diff) |
notify ui on roster changes
Diffstat (limited to '')
-rw-r--r-- | src/eu/siacs/conversations/ui/ContactDetailsActivity.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java index a8527feb..e29a6390 100644 --- a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java +++ b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java @@ -31,6 +31,7 @@ import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.entities.Presences; import eu.siacs.conversations.services.XmppConnectionService; +import eu.siacs.conversations.services.XmppConnectionService.OnRosterUpdate; import eu.siacs.conversations.utils.UIHelper; import eu.siacs.conversations.xmpp.stanzas.PresencePacket; @@ -89,6 +90,20 @@ public class ContactDetailsActivity extends XmppActivity { private LinearLayout keys; + private OnRosterUpdate rosterUpdate = new OnRosterUpdate() { + + @Override + public void onRosterUpdate() { + runOnUiThread(new Runnable() { + + @Override + public void run() { + populateView(); + } + }); + } + }; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -270,6 +285,7 @@ public class ContactDetailsActivity extends XmppActivity { @Override public void onBackendConnected() { + xmppConnectionService.setOnRosterUpdateListener(this.rosterUpdate ); if ((accountJid != null)&&(contactJid != null)) { Account account = xmppConnectionService.findAccountByJid(accountJid); if (account==null) { @@ -356,6 +372,7 @@ public class ContactDetailsActivity extends XmppActivity { } } } + xmppConnectionService.removeOnRosterUpdateListener(); } } |