1
0
Fork 0
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:
Corewala 2022-05-01 11:59:08 -04:00
parent 508d1f39e6
commit 676d64e4bc

View file

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