Disable saving on selecting account

This commit is contained in:
M66B 2019-01-02 10:59:57 +01:00
parent aa72560d15
commit 58d846b5ea
2 changed files with 14 additions and 0 deletions

View File

@ -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() {

View File

@ -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() {