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

@@ -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(