Fix dynamic total for previous days#173
Merged
rickykresslein merged 1 commit intounobserved-io:mainfrom Dec 11, 2025
Merged
Conversation
Only add the running timer to the daily total of a row in the task history UI if the row's date matches the current running task's start date. Previously, the running timer would be added based on the index of the history row. This meant that the first task of the day would incorrectly increment the previous day's total, as the row for the current day is only added once the running timer is stopped.
Contributor
Author
|
Hi, @rickykresslein, sorry for the ping! I'm in no way trying to be impatient, but I was wondering whether you've received notifications for this PR and #174. Thank you again for creating this tool! It's an essential part of my everyday workflow. |
Member
|
Hi, @archer-321. Sorry for how long it's taken me to get to this. I should finally have a bit of time to dedicate to Furtherance soon, so I promise I will get to this. Thanks for your patience. |
Member
|
Looks good, and thank you so much for your patience and for helping to make Furtherance better! This will be in the next release, which will use Iced 0.14 and should be coming pretty soon. |
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.
While using the non-GTK rewrite of Furtherance, I encountered the following bug when using the "dynamic total" setting:
When starting or restarting a task, the current running timer would incorrectly increase the total time of the previous day if the current task was the first task of the day. This bug was caused by the timer implementation that would always provide the current running timer when rendering the first row of the history view. However, Furtherance doesn't render a row for the current day if no tasks have been recorded (i.e. have ended), so the first row would point to a previous day.
Fix the bug by comparing the row's date with the start time of the current running task instead of counting the rendered rows.
Testing
To test this patch using an empty database, manually create a task for the previous day and then start an active task. With the patch applied, the total time for the previous day should no longer increase. Next, stop the active task and start another active task. This time, the total time for the current day should increase.
Thank you for creating Furtherance! It's a tool I'm using daily to keep track of various tasks!