aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-10-29 09:57:03 +0100
committeriNPUTmice <daniel@gultsch.de>2014-10-29 09:57:03 +0100
commitbb26a842694d1fd53fb2f5b579e22521f0c76e31 (patch)
tree256c2f04425250b49e90b612bde566bde87a21df /src
parenta11e6dda8fc73327ea967d0b5a754acfdef505f0 (diff)
fixed intent managment
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index 8a10a7826..1d7364d66 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -244,7 +244,8 @@ public class ConversationActivity extends XmppActivity implements
MenuItem menuSecure = menu.findItem(R.id.action_security);
MenuItem menuArchive = menu.findItem(R.id.action_archive);
MenuItem menuMucDetails = menu.findItem(R.id.action_muc_details);
- MenuItem menuContactDetails = menu.findItem(R.id.action_contact_details);
+ MenuItem menuContactDetails = menu
+ .findItem(R.id.action_contact_details);
MenuItem menuAttach = menu.findItem(R.id.action_attach_file);
MenuItem menuClearHistory = menu.findItem(R.id.action_clear_history);
MenuItem menuAdd = menu.findItem(R.id.action_add);
@@ -625,8 +626,7 @@ public class ConversationActivity extends XmppActivity implements
@Override
protected void onNewIntent(Intent intent) {
if (xmppConnectionServiceBound) {
- if (intent != null
- && VIEW_CONVERSATION.equals(getIntent().getType())) {
+ if (intent != null && VIEW_CONVERSATION.equals(intent.getType())) {
handleViewConversationIntent(intent);
}
} else {
@@ -679,6 +679,10 @@ public class ConversationActivity extends XmppActivity implements
} else if (conversationList.size() <= 0) {
startActivity(new Intent(this, StartConversationActivity.class));
finish();
+ } else if (getIntent() != null
+ && VIEW_CONVERSATION.equals(getIntent().getType())) {
+ handleViewConversationIntent(getIntent());
+ setIntent(null);
} else if (mOpenConverstaion != null) {
selectConversationByUuid(mOpenConverstaion);
paneShouldBeOpen = mPanelOpen;
@@ -687,10 +691,6 @@ public class ConversationActivity extends XmppActivity implements
}
swapConversationFragment();
mOpenConverstaion = null;
- } else if (getIntent() != null
- && VIEW_CONVERSATION.equals(getIntent().getType())) {
- handleViewConversationIntent(getIntent());
- setIntent(null);
} else {
showConversationsOverview();
ConversationFragment selectedFragment = (ConversationFragment) getFragmentManager()
@@ -711,7 +711,7 @@ public class ConversationActivity extends XmppActivity implements
}
ExceptionHelper.checkForCrash(this, this.xmppConnectionService);
}
-
+
private void handleViewConversationIntent(Intent intent) {
String uuid = (String) intent.getExtras().get(CONVERSATION);
String text = intent.getExtras().getString(TEXT, null);