Merge pull request #3818 from ByteHamster/fix-link-crash

Fixed crash when tapping external link in shownotes
This commit is contained in:
H. Lehmann 2020-02-02 11:46:04 +01:00 committed by GitHub
commit 4a4bbe16a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,7 @@ public class IntentUtils {
public static void openInBrowser(Context context, String url) {
try {
Intent myIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(myIntent);
} catch (ActivityNotFoundException e) {
Toast.makeText(context, R.string.pref_no_browser_found, Toast.LENGTH_LONG).show();