aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/ui/ConversationActivity.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/de/gultsch/chat/ui/ConversationActivity.java16
1 files changed, 13 insertions, 3 deletions
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());