1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-12 17:26:17 +00:00

Fix scheduled theme change timing

This commit is contained in:
Gonçalo Santos
2020-03-10 15:41:34 +00:00
parent 38ed5b8541
commit 48c8164689
3 changed files with 5 additions and 4 deletions

View File

@@ -190,6 +190,7 @@ class Main extends React.Component {
'menubar:togglemenubar',
this.toggleMenuBarVisible.bind(this)
)
clearInterval(this.refreshTheme)
}
toggleMenuBarVisible() {

View File

@@ -10,8 +10,8 @@ const chooseTheme = ui => {
const minutes = now.getHours() * 60 + now.getMinutes()
const isEndAfterStart = end > start
const isBetweenStartAndEnd = minutes >= start && minutes <= end
const isBetweenEndAndStart = minutes >= start || minutes <= end
const isBetweenStartAndEnd = minutes >= start && minutes < end
const isBetweenEndAndStart = minutes >= start || minutes < end
if (
(isEndAfterStart && isBetweenStartAndEnd) ||

View File

@@ -335,7 +335,7 @@ class UiTab extends React.Component {
</div>
<div styleName='group-section'>
<div styleName='container'>
<div styleName='range-slider' id='firstRow'>
<div id='firstRow'>
<span
id='rs-bullet-1'
styleName='rs-label'
@@ -353,7 +353,7 @@ class UiTab extends React.Component {
onChange={e => this.handleUIChange(e)}
/>
</div>
<div styleName='range-slider' id='secondRow'>
<div id='secondRow'>
<span
id='rs-bullet-2'
styleName='rs-label'