android: Save global config synchronously in onCloseGameFoldersFragment
Could cause multiple global saves at once that went untracked previously
This commit is contained in:
		@@ -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()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user