summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorGravatar t8952023-12-10 20:52:28 -0500
committerGravatar t8952023-12-12 17:25:37 -0500
commit7ea7c72dde7dd0aa1ed7adf5a622303da2420782 (patch)
treea706f0e12c9ee0adbfa138c4656a3debb3520cc1 /src/android
parentandroid: Remove global save import/exporter UI (diff)
downloadyuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.tar.gz
yuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.tar.xz
yuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.zip
android: Collect latest information for games list
Diffstat (limited to 'src/android')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt3
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/ui/GamesFragment.kt2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt
index 3ac054d8f..64b295fbd 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/SearchFragment.kt
@@ -24,6 +24,7 @@ import androidx.lifecycle.repeatOnLifecycle
24import androidx.preference.PreferenceManager 24import androidx.preference.PreferenceManager
25import info.debatty.java.stringsimilarity.Jaccard 25import info.debatty.java.stringsimilarity.Jaccard
26import info.debatty.java.stringsimilarity.JaroWinkler 26import info.debatty.java.stringsimilarity.JaroWinkler
27import kotlinx.coroutines.flow.collectLatest
27import kotlinx.coroutines.launch 28import kotlinx.coroutines.launch
28import java.util.Locale 29import java.util.Locale
29import org.yuzu.yuzu_emu.R 30import org.yuzu.yuzu_emu.R
@@ -101,7 +102,7 @@ class SearchFragment : Fragment() {
101 } 102 }
102 launch { 103 launch {
103 repeatOnLifecycle(Lifecycle.State.CREATED) { 104 repeatOnLifecycle(Lifecycle.State.CREATED) {
104 gamesViewModel.games.collect { filterAndSearch() } 105 gamesViewModel.games.collectLatest { filterAndSearch() }
105 } 106 }
106 } 107 }
107 launch { 108 launch {
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 d5acf8479..fc0eeb9ad 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
@@ -96,7 +96,7 @@ class GamesFragment : Fragment() {
96 } 96 }
97 launch { 97 launch {
98 repeatOnLifecycle(Lifecycle.State.RESUMED) { 98 repeatOnLifecycle(Lifecycle.State.RESUMED) {
99 gamesViewModel.games.collect { 99 gamesViewModel.games.collectLatest {
100 (binding.gridGames.adapter as GameAdapter).submitList(it) 100 (binding.gridGames.adapter as GameAdapter).submitList(it)
101 if (it.isEmpty()) { 101 if (it.isEmpty()) {
102 binding.noticeText.visibility = View.VISIBLE 102 binding.noticeText.visibility = View.VISIBLE