Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Persist customized timebox time limit when disabling the toggle

Open Ratnesh5 opened this issue 1 month ago • 2 comments

Problem description

In the Compose Timebox settings screen (#21910), users can toggle the timebox feature on/off and configure the duration in minutes.

Currently, when the user disables the "Use timebox" toggle, the collection limit is set to 0. When they enable it again, the UI initializes back to the hardcoded default of 20 minutes (TimeboxSettingsViewModel.DEFAULT_TIMEBOX_MINUTES).

If a user had configured a custom limit (e.g. 45 minutes), disabling and re-enabling the switch loses that custom value.

Steps to reproduce

  1. Navigate to Settings -> Reviewing -> Timeboxing.
  2. Ensure the "Use timebox" toggle is ON.
  3. Change the limit from 20 to 45 mins.
  4. Toggle "Use timebox" OFF.
  5. Toggle "Use timebox" ON.
  6. Result: The limit is reset to 20 mins instead of preserving 45 mins.

Ratnesh5 avatar Oct 23 '26 17:10 Ratnesh5

Hi Ratnesh! I'd be interested in working on this issue. Are you already working on a fix, or would it be okay if I picked this up?

RohanBenielE avatar Oct 23 '26 17:10 RohanBenielE

Hi @RohanBenielE! Thanks for offering to help. Since this is a direct follow-up to my work in #21910 that I discussed with the maintainers, I'm already planning to handle this one once #21910 is merged.

Ratnesh5 avatar Oct 23 '26 17:10 Ratnesh5