mirror of https://github.com/M66B/FairEmail.git
Show send dialog as fix for no public key
This commit is contained in:
parent
a52e56afd8
commit
06359174c5
|
@ -2619,14 +2619,20 @@ public class FragmentCompose extends FragmentBase {
|
||||||
protected void onException(Bundle args, Throwable ex) {
|
protected void onException(Bundle args, Throwable ex) {
|
||||||
if (ex instanceof IllegalArgumentException) {
|
if (ex instanceof IllegalArgumentException) {
|
||||||
Log.i(ex);
|
Log.i(ex);
|
||||||
Snackbar snackbar = Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG);
|
Snackbar snackbar = Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_INDEFINITE);
|
||||||
if (ex.getCause() instanceof CertificateException)
|
|
||||||
snackbar.setAction(R.string.title_fix, new View.OnClickListener() {
|
snackbar.setAction(R.string.title_fix, new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
if (ex.getCause() instanceof CertificateException)
|
||||||
startActivity(
|
startActivity(
|
||||||
new Intent(getContext(), ActivitySetup.class)
|
new Intent(getContext(), ActivitySetup.class)
|
||||||
.putExtra("tab", "encryption"));
|
.putExtra("tab", "encryption"));
|
||||||
|
else {
|
||||||
|
FragmentDialogSend fragment = new FragmentDialogSend();
|
||||||
|
fragment.setArguments(args);
|
||||||
|
fragment.setTargetFragment(FragmentCompose.this, REQUEST_SEND);
|
||||||
|
fragment.show(getParentFragmentManager(), "compose:send");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
snackbar.show();
|
snackbar.show();
|
||||||
|
|
Loading…
Reference in New Issue