aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
index b85d14f2..8a2dfb89 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java
@@ -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);