mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-28 00:20:50 +01:00
Small improvements
This commit is contained in:
@@ -1138,6 +1138,7 @@ public class FragmentAccount extends FragmentEx {
|
||||
Log.i("Accounts=" + accounts.length);
|
||||
for (final Account account : accounts)
|
||||
if (name.equals(account.name)) {
|
||||
btnAuthorize.setEnabled(false);
|
||||
final Snackbar snackbar = Snackbar.make(view, R.string.title_authorizing, Snackbar.LENGTH_SHORT);
|
||||
snackbar.show();
|
||||
|
||||
@@ -1157,15 +1158,17 @@ public class FragmentAccount extends FragmentEx {
|
||||
authorized = token;
|
||||
etUser.setText(account.name);
|
||||
tilPassword.getEditText().setText(token);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex);
|
||||
} finally {
|
||||
btnAuthorize.setEnabled(true);
|
||||
new Handler().postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
snackbar.dismiss();
|
||||
}
|
||||
}, 1000);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
snackbar.setText(Helper.formatThrowable(ex));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user