skip unnecessary loading of conversation overview fragment

This commit is contained in:
Daniel Gultsch 2018-02-25 08:33:22 +01:00
parent 759498ac3a
commit b5fa9b77c9

View file

@ -103,17 +103,21 @@ public class ConversationActivity extends XmppActivity implements OnConversation
if (performRedirectIfNecessary(true)) { if (performRedirectIfNecessary(true)) {
return; return;
} }
for (@IdRes int id : FRAGMENT_ID_NOTIFICATION_ORDER) {
notifyFragmentOfBackendConnected(id);
}
invalidateActionBarTitle();
xmppConnectionService.getNotificationService().setIsInForeground(true); xmppConnectionService.getNotificationService().setIsInForeground(true);
Intent intent = pendingViewIntent.pop(); Intent intent = pendingViewIntent.pop();
if (intent != null) { if (intent != null) {
if (processViewIntent(intent)) { if (processViewIntent(intent)) {
if (binding.secondaryFragment != null) {
notifyFragmentOfBackendConnected(R.id.main_fragment);
}
invalidateActionBarTitle();
return; return;
} }
} }
for (@IdRes int id : FRAGMENT_ID_NOTIFICATION_ORDER) {
notifyFragmentOfBackendConnected(id);
}
invalidateActionBarTitle();
if (binding.secondaryFragment != null && ConversationFragment.getConversation(this) == null) { if (binding.secondaryFragment != null && ConversationFragment.getConversation(this) == null) {
Conversation conversation = ConversationsOverviewFragment.getSuggestion(this); Conversation conversation = ConversationsOverviewFragment.getSuggestion(this);
if (conversation != null) { if (conversation != null) {