Repository navigation
fix(aufgaben): keep a typed timer on a Dringlichkeit change, reset it after adding - #673
Merged
Merged
Conversation
… after adding Changing the Dringlichkeit always rewrote the timer with its default, so a timer the Lagebuchführer had typed was lost without notice. Adding a task cleared only the text, so a typed timer silently carried into the next task, which then fired at a time nobody chose. In both the quick-add form and the task dialog, a Dringlichkeit change now rewrites the timer only while it is empty or still holds the old Dringlichkeit's default. After adding, or after "SPEICHERN & WEITEREN TASK", the timer goes back to the default of the sticky Dringlichkeit. Fixes #658 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #658
Problem
Two problems with the Aufgaben timer, in both the quick-add form and the task dialog:
Change
TasksViewModel.OnNewUrgencyChangedandTaskDialogViewModel.OnUrgencyChangednow use the(oldValue, newValue)overload. They rewrite the timer only while it is empty or still holds the old Dringlichkeit's default. A typed value survives.TasksViewModel.AddTaskandTaskDialogViewModel.SaveAndCreateAnotherreset the timer to the default of the sticky Dringlichkeit. The Dringlichkeit itself stays sticky, as before.A typed value that happens to equal the current default is treated as the default. Nothing on screen tells the two apart, so this needs no extra state.
Tests (written first)
TasksViewModelTestsandTaskDialogViewModelTestseach get four tests:Before the fix, "survives" and "resets" failed in both view models.
Changing_urgency_resets_minutes_but_override_survives_until_next_changepinned the old overwrite and is replaced.No UI change, so no screenshots.
make clean ciandmake format-checkpass locally.🤖 Generated with Claude Code