Skip to content

Commit

Permalink
Merge pull request #1429 from hovancik/fix/lang-up-schedule
Browse files Browse the repository at this point in the history
Fixes Schedule options not updated
  • Loading branch information
hovancik authored Jan 30, 2024
2 parents 7038e07 + 6da6435 commit aae21aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
- transparency issues on Windows 10
- Schedule options not being updated after change of language

## [1.15.1] - 2023-11-19
### Fixed
Expand Down
9 changes: 9 additions & 0 deletions app/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,15 @@ window.onload = (e) => {
document.querySelector('#language').onchange = (event) => {
ipcRenderer.send('save-setting', 'language', event.target.value)
htmlTranslate.translate()
document.querySelectorAll('input[type="range"]').forEach(range => {
const divisor = range.dataset.divisor
const output = range.closest('div').querySelector('output')
range.value = settings[range.name] / divisor
const unit = output.dataset.unit
output.innerHTML = formatUnitAndValue(unit, range.value)
document.querySelector('#longBreakEvery').closest('div').querySelector('output')
.innerHTML = i18next.t('utils.minutes', { count: parseInt(realBreakInterval()) })
})
setWindowHeight()
}
}
Expand Down

0 comments on commit aae21aa

Please sign in to comment.