From 0dc759e9c6d852426520649f58cf33454bda51c6 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Fri, 26 Aug 2022 18:08:16 +1000 Subject: [PATCH] Minor bugs fixed. --- .../infinityforreddit/activities/LinkResolverActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java index ac305a11..266ddd11 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java @@ -166,7 +166,11 @@ public class LinkResolverActivity extends AppCompatActivity { } else if (authority.contains("reddit.com") || authority.contains("redd.it") || authority.contains("reddit.app")) { if (authority.equals("reddit.app.link") && path.isEmpty()) { String redirect = uri.getQueryParameter("$og_redirect"); - handleUri(Uri.parse(redirect)); + if (redirect != null) { + handleUri(Uri.parse(redirect)); + } else { + deepLinkError(uri); + } } else if (path.isEmpty()) { Intent intent = new Intent(this, MainActivity.class); startActivity(intent);