From b5fa9b77c927aa943b67d450a76e23db80e26ec1 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 25 Feb 2018 08:33:22 +0100 Subject: [PATCH] skip unnecessary loading of conversation overview fragment --- .../siacs/conversations/ui/ConversationActivity.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index 9cd22d539..cbeb1cc31 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -103,17 +103,21 @@ public class ConversationActivity extends XmppActivity implements OnConversation if (performRedirectIfNecessary(true)) { return; } - for (@IdRes int id : FRAGMENT_ID_NOTIFICATION_ORDER) { - notifyFragmentOfBackendConnected(id); - } - invalidateActionBarTitle(); xmppConnectionService.getNotificationService().setIsInForeground(true); Intent intent = pendingViewIntent.pop(); if (intent != null) { if (processViewIntent(intent)) { + if (binding.secondaryFragment != null) { + notifyFragmentOfBackendConnected(R.id.main_fragment); + } + invalidateActionBarTitle(); return; } } + 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) {