From aa42eb544a1ebf99dc52d71c917b899d1fce628d Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 5 Feb 2014 22:33:39 +0100 Subject: basic muc support. reworked contact list stuff --- src/de/gultsch/chat/ui/ConversationActivity.java | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/de/gultsch/chat/ui/ConversationActivity.java') diff --git a/src/de/gultsch/chat/ui/ConversationActivity.java b/src/de/gultsch/chat/ui/ConversationActivity.java index ca9bedf7..d9c497f8 100644 --- a/src/de/gultsch/chat/ui/ConversationActivity.java +++ b/src/de/gultsch/chat/ui/ConversationActivity.java @@ -283,17 +283,28 @@ public class ConversationActivity extends XmppActivity { super.onStart(); NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); nm.cancelAll(); + if (conversationList.size()>=1) { + onConvChanged.onConversationListChanged(); + } } - @Override + /*@Override protected void onPause() { super.onPause(); if (xmppConnectionServiceBound) { - Log.d("xmppService","called on stop. remove listener"); xmppConnectionService.removeOnConversationListChangedListener(); unbindService(mConnection); xmppConnectionServiceBound = false; } + }*/ + + @Override + protected void onStop() { + Log.d("gultsch","called on stop in conversation activity"); + if (xmppConnectionServiceBound) { + xmppConnectionService.removeOnConversationListChangedListener(); + } + super.onStop(); } @Override @@ -302,7 +313,6 @@ public class ConversationActivity extends XmppActivity { xmppConnectionService.setOnConversationListChangedListener(this.onConvChanged); if (conversationList.size()==0) { - Log.d("gultsch","conversation list is empty fetch new"); conversationList.clear(); conversationList.addAll(xmppConnectionService .getConversations()); -- cgit v1.2.3