Merge pull request #3730 from wiktor-k/remove-unsaved-accounts
Remove partially constructed accounts on resume
This commit is contained in:
commit
8df62f136d
1 changed files with 6 additions and 2 deletions
|
@ -373,7 +373,9 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
|||
createSpecialAccounts();
|
||||
}
|
||||
|
||||
List<Account> accounts = Preferences.getPreferences(this).getAccounts();
|
||||
Preferences preferences = Preferences.getPreferences(this);
|
||||
preferences.loadAccounts();
|
||||
List<Account> accounts = preferences.getAccounts();
|
||||
Intent intent = getIntent();
|
||||
//onNewIntent(intent);
|
||||
|
||||
|
@ -538,8 +540,10 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
|||
|
||||
|
||||
private void refresh() {
|
||||
Preferences preferences = Preferences.getPreferences(this);
|
||||
preferences.loadAccounts();
|
||||
accounts.clear();
|
||||
accounts.addAll(Preferences.getPreferences(this).getAccounts());
|
||||
accounts.addAll(preferences.getAccounts());
|
||||
|
||||
// see if we should show the welcome message
|
||||
// if (accounts.length < 1) {
|
||||
|
|
Loading…
Reference in a new issue