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){ private fun request(address: String){
val certPassword = if((address.toURI().host == omniTerm.getCurrent().toURI().host)){ if(address.toURI().host != omniTerm.getCurrent().toURI().host) {
decryptedCertPassword decryptedCertPassword = null
}else{
null
} }
if(getInternetStatus()){ if(getInternetStatus()){
if(initialised){ if(initialised){
loadingView(true) loadingView(true)
return model.request(address, certPassword) return model.request(address, decryptedCertPassword)
}else{ }else{
val intent = baseContext.packageManager.getLaunchIntentForPackage(baseContext.packageName) val intent = baseContext.packageManager.getLaunchIntentForPackage(baseContext.packageName)
intent!!.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) intent!!.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)