Confirm address exceptions

This commit is contained in:
M66B 2020-01-07 15:18:24 +01:00
parent 8c59a85283
commit ff7a181dad
1 changed files with 10 additions and 2 deletions

View File

@ -3717,8 +3717,16 @@ public class FragmentCompose extends FragmentBase {
if (ex instanceof MessageRemovedException) if (ex instanceof MessageRemovedException)
finish(); finish();
else if (ex instanceof IllegalArgumentException || else if (ex instanceof AddressException) {
ex instanceof AddressException || ex instanceof UnknownHostException) final Snackbar sb = Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_INDEFINITE);
sb.setAction(android.R.string.ok, new View.OnClickListener() {
@Override
public void onClick(View v) {
sb.dismiss();
}
});
sb.show();
} else if (ex instanceof IllegalArgumentException || ex instanceof UnknownHostException)
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show(); Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
else else
Log.unexpectedError(getParentFragmentManager(), ex); Log.unexpectedError(getParentFragmentManager(), ex);