mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 00:58:50 -05:00
Retain unread count in Accounts activity during configuration changes
This commit is contained in:
parent
8100e00523
commit
144884080d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user