fix: remove Mail account on SSO logout
When logging out from AccountManager using SSO, the associated Mail account was not being removed whereas for non-SSO it was being removed as expected. The `AccountManager.KEY_ACCOUNT_NAME` intent extra contains the username part of the email address (e.g., `username` from `username@example.com`). For non-SSO accounts, accountName and email used to be tha same. However, for SSO accounts, the accountName contains only the username part of the email address. This commit updates the logic to find the matching account by comparing this username with the username part of the account's email address. Previously, it attempted to match the full email address with just the username, which would always fail.
Loading
Please register or sign in to comment