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 opening a bookmark

This commit is contained in:
Corewala 2022-05-01 12:21:22 -04:00
parent 539f17e9be
commit f54add615a

View file

@ -248,7 +248,11 @@ class GemActivity : AppCompatActivity() {
}
R.id.overflow_menu_bookmarks -> {
bookmarksDialog = BookmarksDialog(this, bookmarkDatasource) { bookmark ->
model.request(bookmark.uri.toString())
if(getInternetStatus()){
model.request(bookmark.uri.toString())
}else{
Snackbar.make(binding.root, getString(R.string.no_internet), Snackbar.LENGTH_LONG).show()
}
}
bookmarksDialog?.show()
}