make ConversationsActivity more resistent against being restarted
This commit is contained in:
parent
7b1efe15cd
commit
a83365ee95
|
@ -150,8 +150,7 @@ public class ConversationActivity extends XmppActivity
|
||||||
|
|
||||||
public boolean isConversationsOverviewHideable() {
|
public boolean isConversationsOverviewHideable() {
|
||||||
if (mContentView instanceof SlidingPaneLayout) {
|
if (mContentView instanceof SlidingPaneLayout) {
|
||||||
SlidingPaneLayout mSlidingPaneLayout = (SlidingPaneLayout) mContentView;
|
return true;
|
||||||
return mSlidingPaneLayout.isSlideable();
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1147,6 +1146,7 @@ public class ConversationActivity extends XmppActivity
|
||||||
} else {
|
} else {
|
||||||
if (isConversationsOverviewHideable()) {
|
if (isConversationsOverviewHideable()) {
|
||||||
openConversation();
|
openConversation();
|
||||||
|
updateActionBarTitle(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.mConversationFragment.reInit(getSelectedConversation());
|
this.mConversationFragment.reInit(getSelectedConversation());
|
||||||
|
@ -1327,7 +1327,13 @@ public class ConversationActivity extends XmppActivity
|
||||||
}
|
}
|
||||||
} else if (requestCode == REQUEST_TRUST_KEYS_TEXT || requestCode == REQUEST_TRUST_KEYS_MENU) {
|
} else if (requestCode == REQUEST_TRUST_KEYS_TEXT || requestCode == REQUEST_TRUST_KEYS_MENU) {
|
||||||
this.forbidProcessingPendings = !xmppConnectionServiceBound;
|
this.forbidProcessingPendings = !xmppConnectionServiceBound;
|
||||||
|
if (xmppConnectionServiceBound) {
|
||||||
mConversationFragment.onActivityResult(requestCode, resultCode, data);
|
mConversationFragment.onActivityResult(requestCode, resultCode, data);
|
||||||
|
this.mPostponedActivityResult = null;
|
||||||
|
} else {
|
||||||
|
this.mPostponedActivityResult = new Pair<>(requestCode, data);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mPendingImageUris.clear();
|
mPendingImageUris.clear();
|
||||||
|
|
Loading…
Reference in a new issue