diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java index 9ed1e3883..2c2c4fe48 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java @@ -430,7 +430,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio private void openConversation(Conversation conversation, Bundle extras) { final FragmentManager fragmentManager = getSupportFragmentManager(); - fragmentManager.executePendingTransactions(); + executePendingTransactions(fragmentManager); ConversationFragment conversationFragment = (ConversationFragment) fragmentManager.findFragmentById(R.id.secondary_fragment); final boolean mainNeedsRefresh; if (conversationFragment == null) { @@ -462,6 +462,14 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio } } + private static void executePendingTransactions(final FragmentManager fragmentManager) { + try { + fragmentManager.executePendingTransactions(); + } catch (final Exception e) { + Log.e(Config.LOGTAG,"unable to execute pending fragment transactions"); + } + } + public boolean onXmppUriClicked(Uri uri) { XmppUri xmppUri = new XmppUri(uri); if (xmppUri.isValidJid() && !xmppUri.hasFingerprints()) {