mirror of
https://github.com/Corewala/Buran
synced 2025-03-11 06:33:20 +00:00
Check if internet is available before refreshing
This commit is contained in:
parent
676d64e4bc
commit
539f17e9be
1 changed files with 6 additions and 1 deletions
|
@ -284,7 +284,12 @@ class GemActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
binding.pullToRefresh.setOnRefreshListener {
|
||||
refresh()
|
||||
if(getInternetStatus()){
|
||||
refresh()
|
||||
}else{
|
||||
binding.pullToRefresh.isRefreshing = false
|
||||
Snackbar.make(binding.root, getString(R.string.no_internet), Snackbar.LENGTH_LONG).show()
|
||||
}
|
||||
}
|
||||
|
||||
checkIntentExtras(intent)
|
||||
|
|
Loading…
Add table
Reference in a new issue