0
0
mirror of https://github.com/mueller-ma/PrepaidBalance.git synced 2024-09-20 00:12:15 +02:00

Show as refreshing after permission granted

This commit is contained in:
mueller-ma 2021-06-09 13:55:16 +02:00
parent c470b3eb11
commit 65637f3819

View File

@ -39,6 +39,7 @@ class MainActivity : AppCompatActivity(), CoroutineScope, SwipeRefreshLayout.OnR
ActivityResultContracts.RequestPermission()
) { isGranted: Boolean ->
if (isGranted) {
binding.swiperefresh.isRefreshing = true
onRefresh()
} else {
showSnackbar(R.string.permissions_required)