From 3c7dc29eb9ae754ea8060d4bff977badd218d3fd Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 31 Mar 2018 22:20:07 +0200 Subject: fixed openDialogs call when poping back stack --- src/main/java/de/pixart/messenger/ui/ConversationActivity.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main/java/de/pixart/messenger/ui') diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java index b119d62ea..36b5de0c0 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java @@ -243,9 +243,12 @@ public class ConversationActivity extends XmppActivity implements OnConversation } private void showDialogsIfMainIsOverview() { - Fragment fragment = getFragmentManager().findFragmentById(R.id.main_fragment); + if (xmppConnectionService == null) { + return; + } + final Fragment fragment = getFragmentManager().findFragmentById(R.id.main_fragment); if (fragment != null && fragment instanceof ConversationsOverviewFragment) { - if (ExceptionHelper.checkForCrash(this, this.xmppConnectionService)) { + if (ExceptionHelper.checkForCrash(this)) { return; } openBatteryOptimizationDialogIfNeeded(); @@ -403,6 +406,7 @@ public class ConversationActivity extends XmppActivity implements OnConversation public void onConversationSelected(Conversation conversation) { if (ConversationFragment.getConversation(this) == conversation) { Log.d(Config.LOGTAG, "ignore onConversationSelected() because conversation is already open"); + return; } openConversation(conversation, null); } -- cgit v1.2.3