mirror of
https://github.com/Corewala/Buran
synced 2024-12-22 07:42:43 +00:00
Check if internet is available before loading previous page
This commit is contained in:
parent
508d1f39e6
commit
676d64e4bc
1 changed files with 5 additions and 1 deletions
|
@ -647,7 +647,11 @@ class GemActivity : AppCompatActivity() {
|
|||
|
||||
override fun onBackPressed() {
|
||||
if (omniTerm.canGoBack()){
|
||||
model.request(omniTerm.goBack())
|
||||
if(getInternetStatus()){
|
||||
model.request(omniTerm.goBack())
|
||||
}else{
|
||||
Snackbar.make(binding.root, getString(R.string.no_internet), Snackbar.LENGTH_LONG).show()
|
||||
}
|
||||
}else{
|
||||
println("Buran history is empty - exiting")
|
||||
super.onBackPressed()
|
||||
|
|
Loading…
Reference in a new issue