mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 00:58:50 -05:00
Don't blindly use the saved display mode value
This commit is contained in:
parent
1244cc864a
commit
610af1dfe5
@ -293,17 +293,24 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme
|
|||||||
* {@link #onCreate(Bundle)}. May be {@code null}.
|
* {@link #onCreate(Bundle)}. May be {@code null}.
|
||||||
*/
|
*/
|
||||||
private void initializeDisplayMode(Bundle savedInstanceState) {
|
private void initializeDisplayMode(Bundle savedInstanceState) {
|
||||||
if (savedInstanceState != null) {
|
|
||||||
mDisplayMode = (DisplayMode) savedInstanceState.getSerializable(STATE_DISPLAY_MODE);
|
|
||||||
} else {
|
|
||||||
boolean displayMessage = (mMessageReference != null);
|
|
||||||
mDisplayMode = (displayMessage) ? DisplayMode.MESSAGE_VIEW : DisplayMode.MESSAGE_LIST;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useSplitView()) {
|
if (useSplitView()) {
|
||||||
mDisplayMode = DisplayMode.SPLIT_VIEW;
|
mDisplayMode = DisplayMode.SPLIT_VIEW;
|
||||||
} else if (mMessageViewFragment != null || mDisplayMode == DisplayMode.MESSAGE_VIEW) {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (savedInstanceState != null) {
|
||||||
|
DisplayMode savedDisplayMode =
|
||||||
|
(DisplayMode) savedInstanceState.getSerializable(STATE_DISPLAY_MODE);
|
||||||
|
if (savedDisplayMode != DisplayMode.SPLIT_VIEW) {
|
||||||
|
mDisplayMode = savedDisplayMode;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mMessageViewFragment != null || mMessageReference != null) {
|
||||||
mDisplayMode = DisplayMode.MESSAGE_VIEW;
|
mDisplayMode = DisplayMode.MESSAGE_VIEW;
|
||||||
|
} else {
|
||||||
|
mDisplayMode = DisplayMode.MESSAGE_LIST;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user