kaajjo / LibreSudoku

LibreSudoku - Sudoku app for android built with Kotlin + Jetpack Compose + Material3
GNU General Public License v3.0
412 stars 31 forks source link

HorizontalPicker resets on uiMode change #96

Open nicolarevelant opened 2 months ago

nicolarevelant commented 2 months ago

Problem: when I perform this sequence of events the HorizontalPicker resets:

  1. With "Remember type and difficulty" app setting enabled
  2. Change difficulty and board size
  3. Switch between light and dark mode twice

Possible solution:

use rememberSaveable in HomeScreen.kt to save the current difficulty and the current type whose default values must be taken from the relative ViewModel that returns the default value or the last played value based on the "Remember type and difficulty" app setting

Screenshots:

Version:

1.5.0 (7)