diff options
author | Hermes Junior <ohermesjunior@gmail.com> | 2020-05-10 23:17:14 +0000 |
---|---|---|
committer | OHermesJunior <ohermesjunior@gmail.com> | 2020-05-10 23:17:14 +0000 |
commit | b31c96b2d9f35d622dd9415306296d46a194a0cb (patch) | |
tree | 0a53c142c215deb7cc07f3b18655bce4727412d3 /app/src/main/java | |
parent | f27f7c12a8ae712d48623af87f1b8aff7fa61425 (diff) | |
download | infinity-for-reddit-b31c96b2d9f35d622dd9415306296d46a194a0cb.tar infinity-for-reddit-b31c96b2d9f35d622dd9415306296d46a194a0cb.tar.gz infinity-for-reddit-b31c96b2d9f35d622dd9415306296d46a194a0cb.tar.bz2 infinity-for-reddit-b31c96b2d9f35d622dd9415306296d46a194a0cb.tar.lz infinity-for-reddit-b31c96b2d9f35d622dd9415306296d46a194a0cb.tar.xz infinity-for-reddit-b31c96b2d9f35d622dd9415306296d46a194a0cb.tar.zst infinity-for-reddit-b31c96b2d9f35d622dd9415306296d46a194a0cb.zip |
Handle Reddit home links.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java | 3 |
1 files changed, 3 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 ff39b7f3..145e311e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java @@ -80,6 +80,9 @@ public class LinkResolverActivity extends AppCompatActivity { if (authority.equals("reddit.app.link") && path.isEmpty()) { String redirect = uri.getQueryParameter("$og_redirect"); handleUri(Uri.parse(redirect)); + } else if (path.isEmpty()) { + Intent intent = new Intent(this, MainActivity.class); + startActivity(intent); } else if (path.matches(POST_PATTERN)) { List<String> segments = uri.getPathSegments(); int commentsIndex = segments.lastIndexOf("comments"); |