From b31c96b2d9f35d622dd9415306296d46a194a0cb Mon Sep 17 00:00:00 2001 From: Hermes Junior Date: Mon, 11 May 2020 01:17:14 +0200 Subject: Handle Reddit home links. --- .../infinityforreddit/Activity/LinkResolverActivity.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/src/main/java/ml') 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 segments = uri.getPathSegments(); int commentsIndex = segments.lastIndexOf("comments"); -- cgit v1.2.3