|
|
@ -21,6 +21,7 @@ package eu.faircode.email;
|
|
|
|
|
|
|
|
|
|
|
|
import static android.app.Activity.RESULT_OK;
|
|
|
|
import static android.app.Activity.RESULT_OK;
|
|
|
|
import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_GMAIL;
|
|
|
|
import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_GMAIL;
|
|
|
|
|
|
|
|
import static eu.faircode.email.ServiceAuthenticator.AUTH_TYPE_OAUTH;
|
|
|
|
|
|
|
|
|
|
|
|
import android.app.Dialog;
|
|
|
|
import android.app.Dialog;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Context;
|
|
|
@ -166,9 +167,9 @@ public class FragmentDialogAccount extends FragmentDialogBase {
|
|
|
|
public void onChanged(EntityAccount account) {
|
|
|
|
public void onChanged(EntityAccount account) {
|
|
|
|
tvName.setText(account.name);
|
|
|
|
tvName.setText(account.name);
|
|
|
|
ibEditName.setEnabled(true);
|
|
|
|
ibEditName.setEnabled(true);
|
|
|
|
btnGmail.setVisibility(
|
|
|
|
boolean isGmail = (account.auth_type == AUTH_TYPE_GMAIL ||
|
|
|
|
hasGmail && account.auth_type == AUTH_TYPE_GMAIL
|
|
|
|
(account.auth_type == AUTH_TYPE_OAUTH && "gmail".equals(account.provider)));
|
|
|
|
? View.VISIBLE : View.GONE);
|
|
|
|
btnGmail.setVisibility(hasGmail && isGmail ? View.VISIBLE : View.GONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|