From 144884080dbdd3f4d4c8cb660f9f6394cd23a24e Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 7 Dec 2012 13:35:49 +0100 Subject: [PATCH] Retain unread count in Accounts activity during configuration changes --- src/com/fsck/k9/activity/Accounts.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/fsck/k9/activity/Accounts.java b/src/com/fsck/k9/activity/Accounts.java index 7440e86cb..4e48a9f09 100644 --- a/src/com/fsck/k9/activity/Accounts.java +++ b/src/com/fsck/k9/activity/Accounts.java @@ -326,6 +326,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { }; private static String ACCOUNT_STATS = "accountStats"; + private static String STATE_UNREAD_COUNT = "unreadCount"; private static String SELECTED_CONTEXT_ACCOUNT = "selectedContextAccount"; public static final String EXTRA_STARTUP = "startup"; @@ -441,6 +442,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { if (oldStats != null) { accountStats.putAll(oldStats); } + mUnreadMessageCount = icicle.getInt(STATE_UNREAD_COUNT); } } @@ -450,6 +452,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { if (mSelectedContextAccount != null) { outState.putString(SELECTED_CONTEXT_ACCOUNT, mSelectedContextAccount.getUuid()); } + outState.putSerializable(STATE_UNREAD_COUNT, mUnreadMessageCount); outState.putSerializable(ACCOUNT_STATS, accountStats); }