aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/ConversationActivity.java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationActivity.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
index faa8bdc37..c3fdfefa2 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
@@ -104,7 +104,15 @@ public class ConversationActivity extends XmppActivity implements OnConversation
invalidateActionBarTitle();
Intent intent = pendingViewIntent.pop();
if (intent != null) {
- processViewIntent(intent);
+ if (processViewIntent(intent)) {
+ return;
+ }
+ }
+ if (binding.secondaryFragment != null && ConversationFragment.getConversation(this) == null) {
+ Conversation conversation = ConversationsOverviewFragment.getSuggestion(this);
+ if (conversation != null) {
+ openConversation(conversation, null);
+ }
}
}
@@ -122,14 +130,15 @@ public class ConversationActivity extends XmppActivity implements OnConversation
}
}
- private void processViewIntent(Intent intent) {
+ private boolean processViewIntent(Intent intent) {
String uuid = intent.getStringExtra(EXTRA_CONVERSATION);
Conversation conversation = uuid != null ? xmppConnectionService.findConversationByUuid(uuid) : null;
if (conversation == null) {
Log.d(Config.LOGTAG, "unable to view conversation with uuid:" + uuid);
- return;
+ return false;
}
openConversation(conversation, intent.getExtras());
+ return true;
}
@Override