android: Save global config synchronously in onCloseGameFoldersFragment

Could cause multiple global saves at once that went untracked previously
This commit is contained in:
t895 2024-01-03 21:40:10 -05:00
parent fa04dea7c4
commit 39d28a5131

View file

@ -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()