diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt index 35e365458..805b89b31 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt | |||
| @@ -93,12 +93,12 @@ class GamesFragment : Fragment() { | |||
| 93 | 93 | ||
| 94 | viewLifecycleOwner.lifecycleScope.apply { | 94 | viewLifecycleOwner.lifecycleScope.apply { |
| 95 | launch { | 95 | launch { |
| 96 | repeatOnLifecycle(Lifecycle.State.CREATED) { | 96 | repeatOnLifecycle(Lifecycle.State.RESUMED) { |
| 97 | gamesViewModel.isReloading.collect { binding.swipeRefresh.isRefreshing = it } | 97 | gamesViewModel.isReloading.collect { binding.swipeRefresh.isRefreshing = it } |
| 98 | } | 98 | } |
| 99 | } | 99 | } |
| 100 | launch { | 100 | launch { |
| 101 | repeatOnLifecycle(Lifecycle.State.CREATED) { | 101 | repeatOnLifecycle(Lifecycle.State.RESUMED) { |
| 102 | gamesViewModel.games.collect { | 102 | gamesViewModel.games.collect { |
| 103 | (binding.gridGames.adapter as GameAdapter).submitList(it) | 103 | (binding.gridGames.adapter as GameAdapter).submitList(it) |
| 104 | if (it.isEmpty()) { | 104 | if (it.isEmpty()) { |
| @@ -110,7 +110,7 @@ class GamesFragment : Fragment() { | |||
| 110 | } | 110 | } |
| 111 | } | 111 | } |
| 112 | launch { | 112 | launch { |
| 113 | repeatOnLifecycle(Lifecycle.State.CREATED) { | 113 | repeatOnLifecycle(Lifecycle.State.RESUMED) { |
| 114 | gamesViewModel.shouldSwapData.collect { | 114 | gamesViewModel.shouldSwapData.collect { |
| 115 | if (it) { | 115 | if (it) { |
| 116 | (binding.gridGames.adapter as GameAdapter).submitList( | 116 | (binding.gridGames.adapter as GameAdapter).submitList( |
| @@ -122,7 +122,7 @@ class GamesFragment : Fragment() { | |||
| 122 | } | 122 | } |
| 123 | } | 123 | } |
| 124 | launch { | 124 | launch { |
| 125 | repeatOnLifecycle(Lifecycle.State.CREATED) { | 125 | repeatOnLifecycle(Lifecycle.State.RESUMED) { |
| 126 | gamesViewModel.shouldScrollToTop.collect { | 126 | gamesViewModel.shouldScrollToTop.collect { |
| 127 | if (it) { | 127 | if (it) { |
| 128 | scrollToTop() | 128 | scrollToTop() |