From 7a5095a6aa6b73d49b21c4e105d696c77b2c8366 Mon Sep 17 00:00:00 2001 From: cketti Date: Mon, 4 Feb 2013 17:26:46 +0100 Subject: [PATCH] Fix back button behavior when rotating the device --- src/com/fsck/k9/activity/MessageList.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 7dc1a15e4..0993c98ba 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -79,6 +79,7 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme private static final String EXTRA_SEARCH_FOLDER = "com.fsck.k9.search_folder"; private static final String STATE_DISPLAY_MODE = "displayMode"; + private static final String STATE_MESSAGE_LIST_WAS_DISPLAYED = "messageListWasDisplayed"; public static void actionDisplaySearch(Context context, SearchSpecification search, boolean noThreading, boolean newTask) { @@ -461,6 +462,12 @@ public class MessageList extends K9FragmentActivity implements MessageListFragme super.onSaveInstanceState(outState); outState.putSerializable(STATE_DISPLAY_MODE, mDisplayMode); + outState.putBoolean(STATE_MESSAGE_LIST_WAS_DISPLAYED, mMessageListWasDisplayed); + } + + @Override + public void onRestoreInstanceState(Bundle savedInstanceState) { + mMessageListWasDisplayed = savedInstanceState.getBoolean(STATE_MESSAGE_LIST_WAS_DISPLAYED); } private void initializeActionBar() {