Skip to content

Commit

Permalink
Fix: New algorithm option got ignored at start in debug variant
Browse files Browse the repository at this point in the history
  • Loading branch information
meikpiep committed Jan 5, 2025
1 parent dcb4697 commit b14e265
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ class NewGameViewModel :
val oldVariant = mutableGameVariantState.value
val newVariant = gameVariant()

if (oldVariant != newVariant) {
mutableGameVariantState.value = gridVariantState()
previewService.calculateGrid(mutableGameVariantState.value.variant, viewModelScope)
if (oldState != newState) {
mutableGameVariantState.value = newState
previewService.calculateGrid(newState.variant, viewModelScope)
}
}

Expand Down

0 comments on commit b14e265

Please sign in to comment.