1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +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', 'menubar:togglemenubar',
this.toggleMenuBarVisible.bind(this) this.toggleMenuBarVisible.bind(this)
) )
clearInterval(this.refreshTheme)
} }
toggleMenuBarVisible() { toggleMenuBarVisible() {

View File

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

View File

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