aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorDocile-Alligator <chineseperson5@gmail.com>2022-03-25 08:48:35 +0000
committerDocile-Alligator <chineseperson5@gmail.com>2022-03-25 08:48:35 +0000
commit8ac8ea3d8b1df8155780c82e6264eb47b2aa893d (patch)
tree7742c7e71a6fa24f34cd954a76a023b18228556e /app/src/main/java
parentc87b724a242f327186435fe36f67055985e48a0d (diff)
downloadinfinity-for-reddit-8ac8ea3d8b1df8155780c82e6264eb47b2aa893d.tar
infinity-for-reddit-8ac8ea3d8b1df8155780c82e6264eb47b2aa893d.tar.gz
infinity-for-reddit-8ac8ea3d8b1df8155780c82e6264eb47b2aa893d.tar.bz2
infinity-for-reddit-8ac8ea3d8b1df8155780c82e6264eb47b2aa893d.tar.lz
infinity-for-reddit-8ac8ea3d8b1df8155780c82e6264eb47b2aa893d.tar.xz
infinity-for-reddit-8ac8ea3d8b1df8155780c82e6264eb47b2aa893d.tar.zst
infinity-for-reddit-8ac8ea3d8b1df8155780c82e6264eb47b2aa893d.zip
Fix getRedditUriByPath in LinkResolverActivity.
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/LinkResolverActivity.java6
1 files changed, 5 insertions, 1 deletions
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