replicant-packages_apps_Email/src
Makoto Onuki fc156033d9 Update screen properly when # of accounts becomes 1 from 2
This happens when
- two accounts are configured
- select account 1
- remove account 1, and account 2 becomes active

In this case we failed to select account 2, and the fragments would keep
thinking account 1 was active.  (So no mailboxes would be shown--beacuse there
was of course no mailboxes for account 1!)

When the account list changes, the account loader (created in loadAccounts())
automatically reloads the account list, and calls updateAccountList().  If
there're still more than 1 account at this point, updateAccountList() updates
the account spinner on the action bar.  This will result in
ActionBarNavigationCallback getting called, which then updates the current
account as expected.

However, if there's only one account left, we hide the spinner and just
set the account name to the action bar title, so
ActionBarNavigationCallback won't get called and the current account
never changes.

In this case we shouldn't rely on ActionBarNavigationCallback but have to
explicitly update the current account.

Bug 3491567

Change-Id: Ia9ba3e1c11248ad5a1ba7e055717c5519d6e4884
2011-02-28 17:44:11 -08:00
..
com Update screen properly when # of accounts becomes 1 from 2 2011-02-28 17:44:11 -08:00
org/apache Email split, part huit: Refactor constants, clean emailcommon 2011-02-14 12:18:10 -08:00