Merge pull request #117 from lucasnlm/fix-refresh-user-preferences
Fix load user preferences
This commit is contained in:
commit
9e7b1f9b42
1 changed files with 6 additions and 8 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue