fix: background interval bug

- took far too long
This commit is contained in:
alexsparkes
2022-11-09 15:16:44 +00:00
parent 4da82dd820
commit 7a55a6a430
4 changed files with 13 additions and 15 deletions

View File

@@ -70,7 +70,6 @@ export default class Message extends PureComponent {
/>
<SettingsItem
title={variables.getMessage('modals.main.settings.sections.message.messages')}
subtitle=""
final={true}
>
<button onClick={() => this.modifyMessage('add')}>

View File

@@ -234,7 +234,6 @@ export default class QuickLinks extends PureComponent {
<SettingsItem
title={variables.getMessage('modals.main.settings.sections.quicklinks.title')}
subtitle=""
final={true}
>
<button onClick={() => this.setState({ showAddModal: true })}>

View File

@@ -102,7 +102,6 @@ export default class TimeSettings extends PureComponent {
title={variables.getMessage(
'modals.main.settings.sections.time.vertical_clock.change_hour_colour',
)}
subtitle=""
>
<div className="colourInput">
<input
@@ -124,7 +123,6 @@ export default class TimeSettings extends PureComponent {
title={variables.getMessage(
'modals.main.settings.sections.time.vertical_clock.change_minute_colour',
)}
subtitle=""
>
<div className="colourInput">
<input

View File

@@ -257,17 +257,19 @@ export default class Background extends PureComponent {
this.state.firstTime === true) ||
(localStorage.getItem('backgroundchange') === null && this.state.firstTime === true)
) {
localStorage.setItem('marketplaceNumber', randomNumber);
this.setState({
firstTime: false,
url: randomPhoto.url.default,
type: 'photo_pack',
photoInfo: {
hidden: false,
credit: randomPhoto.photographer,
location: randomPhoto.location || 'N/A',
},
});
if (this.state.firstTime !== true) {
localStorage.setItem('marketplaceNumber', randomNumber);
this.setState({
firstTime: false,
url: randomPhoto.url.default,
type: 'photo_pack',
photoInfo: {
hidden: false,
credit: randomPhoto.photographer,
location: randomPhoto.location || 'N/A',
},
});
}
} else {
if (
Number(