mirror of https://github.com/M66B/FairEmail.git
Disable saving on selecting account
This commit is contained in:
parent
aa72560d15
commit
58d846b5ea
|
@ -1139,6 +1139,10 @@ public class FragmentAccount extends FragmentEx {
|
|||
for (final Account account : accounts)
|
||||
if (name.equals(account.name)) {
|
||||
btnAuthorize.setEnabled(false);
|
||||
etUser.setEnabled(false);
|
||||
tilPassword.setEnabled(false);
|
||||
btnCheck.setEnabled(false);
|
||||
btnSave.setEnabled(false);
|
||||
final Snackbar snackbar = Snackbar.make(view, R.string.title_authorizing, Snackbar.LENGTH_SHORT);
|
||||
snackbar.show();
|
||||
|
||||
|
@ -1163,6 +1167,10 @@ public class FragmentAccount extends FragmentEx {
|
|||
Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex);
|
||||
} finally {
|
||||
btnAuthorize.setEnabled(true);
|
||||
etUser.setEnabled(true);
|
||||
tilPassword.setEnabled(true);
|
||||
btnCheck.setEnabled(true);
|
||||
btnSave.setEnabled(true);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
|
@ -855,6 +855,9 @@ public class FragmentSetup extends FragmentEx {
|
|||
for (final Account account : accounts)
|
||||
if (name.equals(account.name)) {
|
||||
btnAuthorize.setEnabled(false);
|
||||
etEmail.setEnabled(false);
|
||||
tilPassword.setEnabled(false);
|
||||
btnQuick.setEnabled(false);
|
||||
final Snackbar snackbar = Snackbar.make(view, R.string.title_authorizing, Snackbar.LENGTH_SHORT);
|
||||
snackbar.show();
|
||||
|
||||
|
@ -879,6 +882,9 @@ public class FragmentSetup extends FragmentEx {
|
|||
Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex);
|
||||
} finally {
|
||||
btnAuthorize.setEnabled(true);
|
||||
etEmail.setEnabled(true);
|
||||
tilPassword.setEnabled(true);
|
||||
btnQuick.setEnabled(true);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
Loading…
Reference in New Issue