Skip to content

Commit

Permalink
Revert "Display more accurate remaining time in tray"
Browse files Browse the repository at this point in the history
This reverts commit f17e3dc.
  • Loading branch information
Wikiwix committed Oct 31, 2024
1 parent 2e2a758 commit baea051
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- improved break window loading
- updated many translations
- better icons for "Show time in tray" and more accurate time shown (remaining minutes are rounded instead of ceiled)
- better icons for "Show time in tray"

## [1.16.0] - 2024-08-11
### Added
Expand Down
4 changes: 2 additions & 2 deletions app/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ function formatKeyboardShortcut (keyboardShortcut) {
}

function minutesRemaining (milliseconds) {
const seconds = Math.round(milliseconds / 1000.0)
const minutes = Math.round(seconds / 60.0)
const seconds = Math.ceil(milliseconds / 1000.0)
const minutes = Math.ceil(seconds / 60.0)
return minutes
}

Expand Down
2 changes: 1 addition & 1 deletion test/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('canSkip and canPostpone', () => {
minutesRemaining(60000).should.equal(1)
})
it('less then one minute remaining', () => {
minutesRemaining(1).should.equal(0)
minutesRemaining(1).should.equal(1)
})
it('ten minutes remaining', () => {
minutesRemaining(600000).should.equal(10)
Expand Down

0 comments on commit baea051

Please sign in to comment.