From 50b96c0e1a5925d26e01a1b45e2dd92378b55ede Mon Sep 17 00:00:00 2001 From: Tyler Little Date: Thu, 15 Jun 2023 17:39:45 -0600 Subject: [PATCH] Support http links --- app/src/main/java/com/jerboa/Utils.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/jerboa/Utils.kt b/app/src/main/java/com/jerboa/Utils.kt index 406a129c4..17fcd33e0 100644 --- a/app/src/main/java/com/jerboa/Utils.kt +++ b/app/src/main/java/com/jerboa/Utils.kt @@ -383,13 +383,14 @@ fun LazyListState.isScrolledToEnd(): Boolean { * Parses a "url" and returns a spec-compliant Url: * * - https://host/path - leave as-is + * - http://host/path - leave as-is * - /c/community -> https://currentInstance/c/community * - /c/community@instance -> https://instance/c/community * - !community@instance -> https://instance/c/community * - @user@instance -> https://instance/u/user */ fun parseUrl(url: String): String? { - if (url.startsWith("https://")) { + if (url.startsWith("https://") || url.startsWith("https://")) { return url } else if (url.startsWith("/c/")) { if (url.count({ c -> c == '@' }) == 1) {