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)
finish();
else if (ex instanceof IllegalArgumentException ||
ex instanceof AddressException || ex instanceof UnknownHostException)
else if (ex instanceof AddressException) {
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();
else
Log.unexpectedError(getParentFragmentManager(), ex);