mirror of
https://github.com/Corewala/Buran
synced 2025-01-03 05:34:28 +00:00
Check if internet is available before opening a bookmark
This commit is contained in:
parent
539f17e9be
commit
f54add615a
1 changed files with 5 additions and 1 deletions
|
@ -248,7 +248,11 @@ class GemActivity : AppCompatActivity() {
|
||||||
}
|
}
|
||||||
R.id.overflow_menu_bookmarks -> {
|
R.id.overflow_menu_bookmarks -> {
|
||||||
bookmarksDialog = BookmarksDialog(this, bookmarkDatasource) { bookmark ->
|
bookmarksDialog = BookmarksDialog(this, bookmarkDatasource) { bookmark ->
|
||||||
|
if(getInternetStatus()){
|
||||||
model.request(bookmark.uri.toString())
|
model.request(bookmark.uri.toString())
|
||||||
|
}else{
|
||||||
|
Snackbar.make(binding.root, getString(R.string.no_internet), Snackbar.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bookmarksDialog?.show()
|
bookmarksDialog?.show()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue