Skip to content

Commit 48c8164

Browse files
committed
Fix scheduled theme change timing
1 parent 38ed5b8 commit 48c8164

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

browser/main/Main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ class Main extends React.Component {
190190
'menubar:togglemenubar',
191191
this.toggleMenuBarVisible.bind(this)
192192
)
193+
clearInterval(this.refreshTheme)
193194
}
194195

195196
toggleMenuBarVisible() {

browser/main/lib/ThemeManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ const chooseTheme = ui => {
1010
const minutes = now.getHours() * 60 + now.getMinutes()
1111

1212
const isEndAfterStart = end > start
13-
const isBetweenStartAndEnd = minutes >= start && minutes <= end
14-
const isBetweenEndAndStart = minutes >= start || minutes <= end
13+
const isBetweenStartAndEnd = minutes >= start && minutes < end
14+
const isBetweenEndAndStart = minutes >= start || minutes < end
1515

1616
if (
1717
(isEndAfterStart && isBetweenStartAndEnd) ||

browser/main/modals/PreferencesModal/UiTab.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ class UiTab extends React.Component {
335335
</div>
336336
<div styleName='group-section'>
337337
<div styleName='container'>
338-
<div styleName='range-slider' id='firstRow'>
338+
<div id='firstRow'>
339339
<span
340340
id='rs-bullet-1'
341341
styleName='rs-label'
@@ -353,7 +353,7 @@ class UiTab extends React.Component {
353353
onChange={e => this.handleUIChange(e)}
354354
/>
355355
</div>
356-
<div styleName='range-slider' id='secondRow'>
356+
<div id='secondRow'>
357357
<span
358358
id='rs-bullet-2'
359359
styleName='rs-label'

0 commit comments

Comments
 (0)