Fixed some links cannot be opened in this app but it is still present in app chooser.

This commit is contained in:
Alex Ning 2019-10-14 20:05:17 +08:00
parent ab56b26333
commit 6b49a8f8e1

View File

@ -149,6 +149,12 @@ public class LinkResolverActivity extends AppCompatActivity {
}
private void deepLinkError(Uri uri) {
String authority = uri.getAuthority();
if(authority != null && (authority.contains("reddit.com") || authority.contains("redd.it") || authority.contains("reddit.app.link"))) {
openInCustomTabs(uri, getPackageManager());
return;
}
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);