Skip to content
Snippets Groups Projects
Commit 02b3a698 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

conversation: finish if no path

Change-Id: Iff1c7eb4f20edc2fa3dccd7a33a979efeed55e55
parent 8bfbefd0
No related branches found
No related tags found
No related merge requests found
...@@ -62,11 +62,21 @@ public class ConversationActivity extends AppCompatActivity implements Colorable ...@@ -62,11 +62,21 @@ public class ConversationActivity extends AppCompatActivity implements Colorable
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
Intent intent = getIntent();
String action = intent == null ? null : intent.getAction();
JamiApplication.getInstance().startDaemon(); if (intent != null) {
conversationPath = ConversationPath.fromIntent(intent);
} else if (savedInstanceState != null) {
conversationPath = ConversationPath.fromBundle(savedInstanceState);
}
if (conversationPath == null) {
finish();
return;
}
mIsBubble = getIntent().getBooleanExtra(NotificationServiceImpl.EXTRA_BUBBLE, false); mIsBubble = getIntent().getBooleanExtra(NotificationServiceImpl.EXTRA_BUBBLE, false);
JamiApplication.getInstance().startDaemon();
binding = ActivityConversationBinding.inflate(getLayoutInflater()); binding = ActivityConversationBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot()); setContentView(binding.getRoot());
...@@ -91,14 +101,6 @@ public class ConversationActivity extends AppCompatActivity implements Colorable ...@@ -91,14 +101,6 @@ public class ConversationActivity extends AppCompatActivity implements Colorable
return insets; return insets;
}); });
Intent intent = getIntent();
String action = intent == null ? null : intent.getAction();
if (intent != null) {
conversationPath = ConversationPath.fromIntent(intent);
} else if (savedInstanceState != null) {
conversationPath = ConversationPath.fromBundle(savedInstanceState);
}
if (mConversationFragment == null) { if (mConversationFragment == null) {
Bundle bundle = conversationPath.toBundle(); Bundle bundle = conversationPath.toBundle();
bundle.putBoolean(NotificationServiceImpl.EXTRA_BUBBLE, mIsBubble); bundle.putBoolean(NotificationServiceImpl.EXTRA_BUBBLE, mIsBubble);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment