mirror of
https://github.com/Corewala/Buran
synced 2025-01-02 21:24:19 +00:00
Fixed hard crash on home button
This commit is contained in:
parent
84af7e4588
commit
04e8cfc2c7
1 changed files with 11 additions and 3 deletions
|
@ -323,7 +323,7 @@ class GemActivity : AppCompatActivity() {
|
|||
Buran.DEFAULT_HOME_CAPSULE
|
||||
)
|
||||
omniTerm.history.clear()
|
||||
gemRequest(home!!)
|
||||
gemRequest(home!!, false)
|
||||
}
|
||||
|
||||
binding.pullToRefresh.setOnRefreshListener {
|
||||
|
@ -800,8 +800,12 @@ class GemActivity : AppCompatActivity() {
|
|||
return true
|
||||
}
|
||||
|
||||
private fun gemRequest(address: String){
|
||||
if(!isHostSigned(address.toURI())) certPassword = null
|
||||
private fun gemRequest(address: String, sign: Boolean?){
|
||||
if(sign == null){
|
||||
if(!isHostSigned(address.toURI())) certPassword = null
|
||||
}else if(!sign){
|
||||
certPassword = null
|
||||
}
|
||||
updateClientCertIcon()
|
||||
|
||||
if(getInternetStatus()){
|
||||
|
@ -820,6 +824,10 @@ class GemActivity : AppCompatActivity() {
|
|||
}
|
||||
}
|
||||
|
||||
private fun gemRequest(address: String){
|
||||
gemRequest(address, null)
|
||||
}
|
||||
|
||||
override fun onBackPressed() {
|
||||
if (omniTerm.canGoBack()){
|
||||
gemRequest(omniTerm.goBack())
|
||||
|
|
Loading…
Reference in a new issue