aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-10 21:52:58 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-10 21:52:58 +0100
commita5de5060a92957b3f2ef6890e3784b5b684b886b (patch)
treed3d4863e3b18c702f2c1bdda47ed56bedd74ef02 /src/eu/siacs/conversations/ui/ConversationActivity.java
parentbaf0d6478750bb59e3f883fb7f814a92f27b8a29 (diff)
another possible fix for notificationgate
Diffstat (limited to 'src/eu/siacs/conversations/ui/ConversationActivity.java')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index 02d784273..ced860daf 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -407,9 +407,8 @@ public class ConversationActivity extends XmppActivity {
public void onStart() {
super.onStart();
- if (xmppConnectionServiceBound) {
- xmppConnectionService.setOnConversationListChangedListener(this.onConvChanged);
- }
+ this.registerListener();
+ xmppConnectionService.setOnConversationListChangedListener(this.onConvChanged);
if (conversationList.size()>=1) {
onConvChanged.onConversationListChanged();
}
@@ -427,8 +426,7 @@ public class ConversationActivity extends XmppActivity {
@Override
void onBackendConnected() {
- xmppConnectionService.setOnConversationListChangedListener(this.onConvChanged);
-
+ this.registerListener();
if (conversationList.size()==0) {
conversationList.addAll(xmppConnectionService
.getConversations());
@@ -472,7 +470,13 @@ public class ConversationActivity extends XmppActivity {
}
}
}
- @Override
+ public void registerListener() {
+ if (xmppConnectionServiceBound) {
+ xmppConnectionService.setOnConversationListChangedListener(this.onConvChanged);
+ }
+ }
+
+ @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (resultCode == RESULT_OK) {