trying to fix activity has been destroyed error

This commit is contained in:
iNPUTmice 2014-08-09 11:37:05 +02:00
parent a33bf0b4ae
commit d486d5def9

View file

@ -607,12 +607,15 @@ public class ConversationActivity extends XmppActivity {
protected ConversationFragment swapConversationFragment() {
ConversationFragment selectedFragment = new ConversationFragment();
if (!isFinishing()) {
FragmentTransaction transaction = getFragmentManager()
.beginTransaction();
transaction.replace(R.id.selected_conversation, selectedFragment,
"conversation");
transaction.commitAllowingStateLoss();
transaction.commitAllowingStateLoss();
}
return selectedFragment;
}