mirror of https://github.com/Corewala/Buran
Fixed hard crash on home button
This commit is contained in:
parent
84af7e4588
commit
04e8cfc2c7
|
@ -323,7 +323,7 @@ class GemActivity : AppCompatActivity() {
|
||||||
Buran.DEFAULT_HOME_CAPSULE
|
Buran.DEFAULT_HOME_CAPSULE
|
||||||
)
|
)
|
||||||
omniTerm.history.clear()
|
omniTerm.history.clear()
|
||||||
gemRequest(home!!)
|
gemRequest(home!!, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.pullToRefresh.setOnRefreshListener {
|
binding.pullToRefresh.setOnRefreshListener {
|
||||||
|
@ -800,8 +800,12 @@ class GemActivity : AppCompatActivity() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun gemRequest(address: String){
|
private fun gemRequest(address: String, sign: Boolean?){
|
||||||
if(!isHostSigned(address.toURI())) certPassword = null
|
if(sign == null){
|
||||||
|
if(!isHostSigned(address.toURI())) certPassword = null
|
||||||
|
}else if(!sign){
|
||||||
|
certPassword = null
|
||||||
|
}
|
||||||
updateClientCertIcon()
|
updateClientCertIcon()
|
||||||
|
|
||||||
if(getInternetStatus()){
|
if(getInternetStatus()){
|
||||||
|
@ -820,6 +824,10 @@ class GemActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun gemRequest(address: String){
|
||||||
|
gemRequest(address, null)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onBackPressed() {
|
override fun onBackPressed() {
|
||||||
if (omniTerm.canGoBack()){
|
if (omniTerm.canGoBack()){
|
||||||
gemRequest(omniTerm.goBack())
|
gemRequest(omniTerm.goBack())
|
||||||
|
|
Loading…
Reference in New Issue