From 39d28a51317bbb352cbd51f9e019011b7fd63d9d Mon Sep 17 00:00:00 2001 From: t895 Date: Wed, 3 Jan 2024 21:40:10 -0500 Subject: android: Save global config synchronously in onCloseGameFoldersFragment Could cause multiple global saves at once that went untracked previously --- .../app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/android/app') diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt index d19f20dc2..5ae05b5cc 100644 --- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt +++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/model/GamesViewModel.kt @@ -167,13 +167,14 @@ class GamesViewModel : ViewModel() { } } - fun onCloseGameFoldersFragment() = + fun onCloseGameFoldersFragment() { + NativeConfig.saveGlobalConfig() viewModelScope.launch { withContext(Dispatchers.IO) { - NativeConfig.saveGlobalConfig() getGameDirs(true) } } + } private fun getGameDirs(reloadList: Boolean = false) { val gameDirs = NativeConfig.getGameDirs() -- cgit v1.2.3