1
0
Fork 1

Fix crash trying to open link when no app for it

(cherry picked from commit 176cbc9a28a814f57e6d410139dda427b2ababb6)
This commit is contained in:
Stephen Paul Weber 2023-10-10 09:47:44 -05:00 committed by Arne
parent 51d2e86e48
commit bd5ca4d10c

View file

@ -890,7 +890,11 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
switchToConversation(xmppConnectionService.findOrCreateConversation(account, Jid.of(uri.getSchemeSpecificPart()), false, true));
} else {
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
try {
startActivity(intent);
} catch (ActivityNotFoundException e) {
Toast.makeText(this, R.string.no_application_found_to_open_link, Toast.LENGTH_SHORT).show();
}
}
});
binding.profileItems.setOnItemLongClickListener((a0, v, pos, a3) -> {