|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|