Browse Source

Show account is authorizing

main
M66B 6 years ago
parent
commit
cf0e6386ba
2 changed files with 6 additions and 0 deletions
  1. +5
    -0
      app/src/main/java/eu/faircode/email/FragmentAccount.java
  2. +1
    -0
      app/src/main/res/values/strings.xml

+ 5
- 0
app/src/main/java/eu/faircode/email/FragmentAccount.java View File

@ -54,6 +54,7 @@ import android.widget.Spinner;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.textfield.TextInputLayout;
import com.sun.mail.imap.IMAPFolder;
import com.sun.mail.imap.IMAPStore;
@ -804,6 +805,8 @@ public class FragmentAccount extends FragmentEx {
Log.i(Helper.TAG, "Accounts=" + accounts.length);
for (final Account account : accounts)
if (name.equals(account.name)) {
final Snackbar snackbar = Snackbar.make(view, R.string.title_authorizing, Snackbar.LENGTH_SHORT);
snackbar.show();
am.getAuthToken(
account,
Helper.getAuthTokenType(type),
@ -823,6 +826,8 @@ public class FragmentAccount extends FragmentEx {
} catch (Throwable ex) {
Log.e(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
Toast.makeText(getContext(), Helper.formatThrowable(ex), Toast.LENGTH_LONG).show();
} finally {
snackbar.dismiss();
}
}
},


+ 1
- 0
app/src/main/res/values/strings.xml View File

@ -94,6 +94,7 @@
<string name="title_user">User name</string>
<string name="title_password">Password</string>
<string name="title_authorize">Select account</string>
<string name="title_authorizing">Authorizing account &#8230;</string>
<string name="title_instructions">Instructions</string>
<string name="title_store_sent">Store sent messages (enable if needed only)</string>
<string name="title_interval">Keep-alive interval (minutes)</string>


Loading…
Cancel
Save