Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the time displayed in the tray icon #1505

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

Wikiwix
Copy link
Contributor

@Wikiwix Wikiwix commented Nov 2, 2024

Issue: closes #1504

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • issue was opened to discuss proposed changes before starting implementation. It is important do discuss changes before implementing them (Why should we add it? How should it work? How should it look? Where will it be? ...).
    See Recreate time in tray images #1502 (comment)
  • during development, node version specified in package.json was used (ie using nvm).
  • package versions and package-lock.json were not changed (npm install --no-save).
  • app version number was not changed.
  • all new code has tests to ensure against regressions.
  • npm run lint reports no offenses.
  • npm run test is error-free.
  • README and CHANGELOG were updated accordingly.
  • after PR is approved, all commits in it are squashed

Description of the Change

  • Take the break notification time into account for the time in the tray
  • Move the timeToNextBreak logic into a separate getter that is used everywhere this time is displayed (saves some lines of code)
  • Use rounded time for the tray icon (to align with the tooltip), and add an additional unit test for this

Verification Process

Ran the software with the changes for some time

Other information

First discussed here

- Take the break notification time into account
- Move the timeToNextBreak logic into a separate getter that is used everywhere this time is displayed
- Use rounded time for the tray icon (to align with the tooltip)
@Wikiwix Wikiwix mentioned this pull request Nov 2, 2024
9 tasks
Copy link

codecov bot commented Nov 2, 2024

Codecov Report

Attention: Patch coverage is 9.09091% with 10 lines in your changes missing coverage. Please review.

Project coverage is 14.88%. Comparing base (a790f12) to head (f32b922).
Report is 2 commits behind head on trunk.

Files with missing lines Patch % Lines
app/breaksPlanner.js 0.00% 7 Missing ⚠️
app/utils/statusMessages.js 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #1505      +/-   ##
==========================================
+ Coverage   14.75%   14.88%   +0.13%     
==========================================
  Files          30       30              
  Lines        1925     1921       -4     
==========================================
+ Hits          284      286       +2     
+ Misses       1641     1635       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@hovancik hovancik left a comment

Choose a reason for hiding this comment

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

Nice catch, many thanks!

@hovancik hovancik merged commit e8831fb into hovancik:trunk Nov 3, 2024
4 of 5 checks passed
@Wikiwix Wikiwix deleted the fix_incorrect_tray_time branch November 3, 2024 10:27
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.

[Bug]: Time in tray is incorrect when break notifications are scheduled
2 participants