mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-11 17:29:48 +01:00
Simplification
This commit is contained in:
@@ -160,16 +160,13 @@ public class FragmentDialogUnsubscribe extends FragmentDialogBase {
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
dialog.dismiss();
|
||||
if (ex instanceof IllegalStateException)
|
||||
if (ex instanceof IllegalStateException || ex instanceof UnknownHostException)
|
||||
ToastEx.makeText(context, ex.getMessage(), Toast.LENGTH_LONG).show();
|
||||
else if (ex instanceof IllegalArgumentException || ex instanceof IOException)
|
||||
if (!(ex instanceof UnknownHostException)) {
|
||||
ToastEx.makeText(context,
|
||||
context.getString(R.string.title_unsubscribe_error,
|
||||
Log.formatThrowable(ex, false)),
|
||||
Toast.LENGTH_LONG).show();
|
||||
} else
|
||||
Log.unexpectedError(getParentFragmentManager(), ex);
|
||||
ToastEx.makeText(context,
|
||||
context.getString(R.string.title_unsubscribe_error,
|
||||
Log.formatThrowable(ex, false)),
|
||||
Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}.execute(FragmentDialogUnsubscribe.this, args, "unsubscribe");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user