mirror of https://github.com/Corewala/Buran
Check if internet is available before loading previous page
This commit is contained in:
parent
508d1f39e6
commit
676d64e4bc
|
@ -647,7 +647,11 @@ class GemActivity : AppCompatActivity() {
|
||||||
|
|
||||||
override fun onBackPressed() {
|
override fun onBackPressed() {
|
||||||
if (omniTerm.canGoBack()){
|
if (omniTerm.canGoBack()){
|
||||||
|
if(getInternetStatus()){
|
||||||
model.request(omniTerm.goBack())
|
model.request(omniTerm.goBack())
|
||||||
|
}else{
|
||||||
|
Snackbar.make(binding.root, getString(R.string.no_internet), Snackbar.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
println("Buran history is empty - exiting")
|
println("Buran history is empty - exiting")
|
||||||
super.onBackPressed()
|
super.onBackPressed()
|
||||||
|
|
Loading…
Reference in New Issue