Fix 'Visit website' button crashes app if there is no browser installed (#4520)

This commit is contained in:
Ezequiel 2020-10-11 13:05:02 -03:00 committed by GitHub
parent 3e771c664f
commit 84db56f82b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -8,6 +8,7 @@ import androidx.annotation.AttrRes;
import androidx.annotation.StringRes;
import de.danoeh.antennapod.R;
import de.danoeh.antennapod.core.feed.FeedItem;
import de.danoeh.antennapod.core.util.IntentUtils;
public class VisitWebsiteActionButton extends ItemActionButton {
@ -29,8 +30,7 @@ public class VisitWebsiteActionButton extends ItemActionButton {
@Override
public void onClick(Context context) {
Uri uri = Uri.parse(item.getLink());
context.startActivity(new Intent(Intent.ACTION_VIEW, uri));
IntentUtils.openInBrowser(context, item.getLink());
}
@Override