diff options
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/CustomView/CustomMarkwonView.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/CustomView/CustomMarkwonView.java b/app/src/main/java/CustomView/CustomMarkwonView.java index da6b2f55..d5828f13 100644 --- a/app/src/main/java/CustomView/CustomMarkwonView.java +++ b/app/src/main/java/CustomView/CustomMarkwonView.java @@ -44,7 +44,11 @@ public class CustomMarkwonView extends MarkwonView { if(uri.getHost() != null && uri.getHost().contains("reddit.com")) { customTabsIntent.intent.setPackage(context.getPackageName()); } - customTabsIntent.launchUrl(context, uri); + String uriString = uri.toString(); + if(!uriString.startsWith("http://") && (!uriString.startsWith("https://"))) { + uriString = "http://" + uriString; + } + customTabsIntent.launchUrl(context, Uri.parse(uriString)); } }).build(); |