summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authort895 <clombardo169@gmail.com>2023-12-11 02:52:28 +0100
committert895 <clombardo169@gmail.com>2023-12-12 23:25:37 +0100
commit7ea7c72dde7dd0aa1ed7adf5a622303da2420782 (patch)
treea706f0e12c9ee0adbfa138c4656a3debb3520cc1 /src
parentandroid: Remove global save import/exporter UI (diff)
downloadyuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.tar
yuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.tar.gz
yuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.tar.bz2
yuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.tar.lz
yuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.tar.xz
yuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.tar.zst
yuzu-7ea7c72dde7dd0aa1ed7adf5a622303da2420782.zip
Diffstat (limited to 'src')
-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
import androidx.preference.PreferenceManager
import info.debatty.java.stringsimilarity.Jaccard
import info.debatty.java.stringsimilarity.JaroWinkler
+import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import java.util.Locale
import org.yuzu.yuzu_emu.R
@@ -101,7 +102,7 @@ class SearchFragment : Fragment() {
}
launch {
repeatOnLifecycle(Lifecycle.State.CREATED) {
- gamesViewModel.games.collect { filterAndSearch() }
+ gamesViewModel.games.collectLatest { filterAndSearch() }
}
}
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() {
}
launch {
repeatOnLifecycle(Lifecycle.State.RESUMED) {
- gamesViewModel.games.collect {
+ gamesViewModel.games.collectLatest {
(binding.gridGames.adapter as GameAdapter).submitList(it)
if (it.isEmpty()) {
binding.noticeText.visibility = View.VISIBLE