From 4808620743ae5d7fe4f4b266ecd32ed51ab1e1fa Mon Sep 17 00:00:00 2001 From: Corewala Date: Tue, 17 May 2022 19:12:42 -0400 Subject: [PATCH] Simplified request function --- app/src/main/java/corewala/buran/ui/GemActivity.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/corewala/buran/ui/GemActivity.kt b/app/src/main/java/corewala/buran/ui/GemActivity.kt index 4074579..7478274 100644 --- a/app/src/main/java/corewala/buran/ui/GemActivity.kt +++ b/app/src/main/java/corewala/buran/ui/GemActivity.kt @@ -754,16 +754,14 @@ class GemActivity : AppCompatActivity() { } private fun request(address: String){ - val certPassword = if((address.toURI().host == omniTerm.getCurrent().toURI().host)){ - decryptedCertPassword - }else{ - null + if(address.toURI().host != omniTerm.getCurrent().toURI().host) { + decryptedCertPassword = null } if(getInternetStatus()){ if(initialised){ loadingView(true) - return model.request(address, certPassword) + return model.request(address, decryptedCertPassword) }else{ val intent = baseContext.packageManager.getLaunchIntentForPackage(baseContext.packageName) intent!!.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)