Simplified request function

This commit is contained in:
Corewala 2022-05-17 19:12:42 -04:00
parent 20846dad47
commit 4808620743
1 changed files with 3 additions and 5 deletions

View File

@ -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)