Loading k9mail/src/main/java/foundation/e/mail/Account.java +4 −3 Original line number Diff line number Diff line Loading @@ -621,10 +621,11 @@ public class Account implements BaseAccount, AccountConfig { // TODO: Remove preference settings that may exist for individual // folders in the account. editor.commit(); if(getEmail() != null) { Globals.getOAuth2TokenProvider().invalidateToken(getEmail()); Globals.getOAuth2TokenProvider().disconnectEmailWithK9(getEmail()); } } private static int findNewAccountNumber(List<Integer> accountNumbers) { int newAccountNumber = -1; Loading k9mail/src/main/java/foundation/e/mail/activity/Accounts.java +18 −15 Original line number Diff line number Diff line Loading @@ -702,6 +702,8 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { for (Account account : accounts) { if (account.isDeviceAccount()) { boolean accountIsSignedInOnDevice = false; // because of a now fixed bug, accounts with empty mails coming from custom nextcloud server could have been added: we need to remove them if(account.getEmail() != null) { for (android.accounts.Account eeloAccount : eeloAccounts) { String emailId = accountManager.getUserData(eeloAccount, ACCOUNT_EMAIL_ADDRESS_KEY); Loading @@ -719,11 +721,12 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { break; } } } if (!accountIsSignedInOnDevice) { selectedContextAccount = account; Account realAccount = (Account) selectedContextAccount; Account realAccount = account; try { realAccount.getLocalStore().delete(); Loading Loading
k9mail/src/main/java/foundation/e/mail/Account.java +4 −3 Original line number Diff line number Diff line Loading @@ -621,10 +621,11 @@ public class Account implements BaseAccount, AccountConfig { // TODO: Remove preference settings that may exist for individual // folders in the account. editor.commit(); if(getEmail() != null) { Globals.getOAuth2TokenProvider().invalidateToken(getEmail()); Globals.getOAuth2TokenProvider().disconnectEmailWithK9(getEmail()); } } private static int findNewAccountNumber(List<Integer> accountNumbers) { int newAccountNumber = -1; Loading
k9mail/src/main/java/foundation/e/mail/activity/Accounts.java +18 −15 Original line number Diff line number Diff line Loading @@ -702,6 +702,8 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { for (Account account : accounts) { if (account.isDeviceAccount()) { boolean accountIsSignedInOnDevice = false; // because of a now fixed bug, accounts with empty mails coming from custom nextcloud server could have been added: we need to remove them if(account.getEmail() != null) { for (android.accounts.Account eeloAccount : eeloAccounts) { String emailId = accountManager.getUserData(eeloAccount, ACCOUNT_EMAIL_ADDRESS_KEY); Loading @@ -719,11 +721,12 @@ public class Accounts extends K9ListActivity implements OnItemClickListener { break; } } } if (!accountIsSignedInOnDevice) { selectedContextAccount = account; Account realAccount = (Account) selectedContextAccount; Account realAccount = account; try { realAccount.getLocalStore().delete(); Loading