From f89f41ae14993d98564481d2e2995ee1c427be2d Mon Sep 17 00:00:00 2001 From: Corewala Date: Mon, 1 Aug 2022 18:38:09 -0400 Subject: [PATCH] Removed broken null check on http proxy --- .../java/corewala/buran/ui/GemActivity.kt | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/corewala/buran/ui/GemActivity.kt b/app/src/main/java/corewala/buran/ui/GemActivity.kt index 277e54b..c2413fc 100644 --- a/app/src/main/java/corewala/buran/ui/GemActivity.kt +++ b/app/src/main/java/corewala/buran/ui/GemActivity.kt @@ -919,19 +919,17 @@ class GemActivity : AppCompatActivity() { updateClientCertIcon() if(address.startsWith("http://") or address.startsWith("https://")){ - val httpProxy = prefs.getString("http_proxy", null) + val httpProxy = prefs.getString("http_proxy", null) ?: "" - if (httpProxy != null) { - if( - httpProxy.isNullOrEmpty() - or !httpProxy.startsWith("gemini://") - or httpProxy.contains(" ") - or !httpProxy.contains(".") - ){ - openExternalLink(address) - }else{ - model.request(httpProxy, certPassword, address) - } + if( + httpProxy.isNullOrEmpty() + or !httpProxy.startsWith("gemini://") + or httpProxy.contains(" ") + or !httpProxy.contains(".") + ){ + openExternalLink(address) + }else{ + model.request(httpProxy, certPassword, address) } }