diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java index 17e033485a90fcd3998c9216591a51511788daa8..9f16b24dfba88aec2b3310c7be5cd9bc4a55623a 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java @@ -423,34 +423,36 @@ public class ConversationsActivity extends XmppActivity return; } xmppConnectionService.getNotificationService().setIsInForeground(true); - final Intent intent = pendingViewIntent.pop(); + var intent = pendingViewIntent.pop(); if (intent != null) { if (processViewIntent(intent)) { if (binding.secondaryFragment != null) { notifyFragmentOfBackendConnected(R.id.main_fragment); } - invalidateActionBarTitle(); - return; + } else { + intent = null; } } - for (@IdRes int id : FRAGMENT_ID_NOTIFICATION_ORDER) { - notifyFragmentOfBackendConnected(id); - } - final ActivityResult activityResult = postponedActivityResult.pop(); - if (activityResult != null) { - handleActivityResult(activityResult); - } + if (intent == null) { + for (@IdRes int id : FRAGMENT_ID_NOTIFICATION_ORDER) { + notifyFragmentOfBackendConnected(id); + } - invalidateActionBarTitle(); - if (binding.secondaryFragment != null - && ConversationFragment.getConversation(this) == null) { - Conversation conversation = ConversationsOverviewFragment.getSuggestion(this); - if (conversation != null) { - openConversation(conversation, null); + final ActivityResult activityResult = postponedActivityResult.pop(); + if (activityResult != null) { + handleActivityResult(activityResult); + } + if (binding.secondaryFragment != null + && ConversationFragment.getConversation(this) == null) { + Conversation conversation = ConversationsOverviewFragment.getSuggestion(this); + if (conversation != null) { + openConversation(conversation, null); + } } + showDialogsIfMainIsOverview(); } - showDialogsIfMainIsOverview(); + invalidateActionBarTitle(); if (accountHeader != null || binding == null || binding.drawer == null) { refreshUiReal();