From 8ac8ea3d8b1df8155780c82e6264eb47b2aa893d Mon Sep 17 00:00:00 2001 From: Docile-Alligator Date: Fri, 25 Mar 2022 16:48:35 +0800 Subject: Fix getRedditUriByPath in LinkResolverActivity. --- .../infinityforreddit/activities/LinkResolverActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app') 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 6e744fd4..42bc12d2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java @@ -60,7 +60,11 @@ public class LinkResolverActivity extends AppCompatActivity { CustomThemeWrapper mCustomThemeWrapper; private Uri getRedditUriByPath(String path) { - return Uri.parse("https://www.reddit.com" + path); + if (path.charAt(0) != '/') { + return Uri.parse("https://www.reddit.com/" + path); + } else { + return Uri.parse("https://www.reddit.com" + path); + } } @Override -- cgit v1.2.3