Skip to content

Commit

Permalink
Don't call promptForServerPasswords() if we already know all passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
cketti committed Nov 7, 2011
1 parent d6c03de commit 6d94638
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/com/fsck/k9/activity/Accounts.java
Expand Up @@ -1383,11 +1383,15 @@ protected void okayAction(Accounts activity) {
List<Account> disabledAccounts = new ArrayList<Account>();
for (AccountDescriptionPair accountPair : mImportResults.importedAccounts) {
Account account = preferences.getAccount(accountPair.imported.uuid);
if (!account.isEnabled()) {
if (account != null && !account.isEnabled()) {
disabledAccounts.add(account);
}
}
activity.promptForServerPasswords(disabledAccounts);
if (disabledAccounts.size() > 0) {
activity.promptForServerPasswords(disabledAccounts);
} else {
activity.setNonConfigurationInstance(null);
}
}
}

Expand Down

0 comments on commit 6d94638

Please sign in to comment.