Merge pull request #117 from lucasnlm/fix-refresh-user-preferences

Fix load user preferences
This commit is contained in:
Lucas Nunes 2020-07-01 23:31:17 -03:00 committed by GitHub
commit 9e7b1f9b42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -297,14 +297,12 @@ class GameViewModel @ViewModelInject constructor(
}
fun refreshUserPreferences() {
if (initialized) {
val questionMark = preferencesRepository.useQuestionMark()
val controlType = preferencesRepository.controlStyle()
val gameControl = GameControl.fromControlType(controlType)
gameController.apply {
updateGameControl(gameControl)
useQuestionMark(questionMark)
}
val questionMark = preferencesRepository.useQuestionMark()
val controlType = preferencesRepository.controlStyle()
val gameControl = GameControl.fromControlType(controlType)
gameController.apply {
updateGameControl(gameControl)
useQuestionMark(questionMark)
}
}