Skip to content

MBS-10663: Fix date/duration view switch not being idempotent#13

Open
Barbuia wants to merge 1 commit intomainfrom
MBS-10663-Fix_date_switch_not_idempotent
Open

MBS-10663: Fix date/duration view switch not being idempotent#13
Barbuia wants to merge 1 commit intomainfrom
MBS-10663-Fix_date_switch_not_idempotent

Conversation

@Barbuia
Copy link
Copy Markdown

@Barbuia Barbuia commented Mar 21, 2026

Refactored updateTargetTime into two separate functions:

  • updateTargetTimeFromCurrentView(): reads value from visible view
  • updateDisplayValues(): syncs both UI elements from stored time

This ensures switching between date and duration views preserves the exact same target time without rounding drift.

@Barbuia Barbuia force-pushed the MBS-10663-Fix_date_switch_not_idempotent branch 3 times, most recently from d5c6f78 to 1722b16 Compare March 21, 2026 06:21
Copy link
Copy Markdown
Member

@PhMemmel PhMemmel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching between now works, but it's getting out of sync with the stored value.

What works:

  • Configure target time: 02.04.2026 9:50
  • Save
  • Info field shows 02.04.2026 9:50 as target time

What does not work:

  • Configure target time: 02.04.2026 09:50
  • Switch to count down selector
  • Save
  • Info field shows 02.04.2026 9:49, or sometimes even 9:48

Refactored updateTargetTime into two separate functions:
- updateTargetTimeFromCurrentView(): reads value from visible view
- updateDisplayValues(): syncs both UI elements from stored time

This ensures switching between date and duration views preserves
the exact same target time without rounding drift.
@Barbuia Barbuia force-pushed the MBS-10663-Fix_date_switch_not_idempotent branch from 1722b16 to 1d2e582 Compare April 2, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants