mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-28 03:46:00 +01:00
Show Gmail app delete button for Gmail/OAuth
This commit is contained in:
@@ -21,6 +21,7 @@ package eu.faircode.email;
|
||||
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_GMAIL;
|
||||
import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_OAUTH;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
@@ -166,9 +167,9 @@ public class FragmentDialogAccount extends FragmentDialogBase {
|
||||
public void onChanged(EntityAccount account) {
|
||||
tvName.setText(account.name);
|
||||
ibEditName.setEnabled(true);
|
||||
btnGmail.setVisibility(
|
||||
hasGmail && account.auth_type == AUTH_TYPE_GMAIL
|
||||
? View.VISIBLE : View.GONE);
|
||||
boolean isGmail = (account.auth_type == AUTH_TYPE_GMAIL ||
|
||||
(account.auth_type == AUTH_TYPE_OAUTH && "gmail".equals(account.provider)));
|
||||
btnGmail.setVisibility(hasGmail && isGmail ? View.VISIBLE : View.GONE);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user