refactor: clean translation system and more widget stuff

This commit is contained in:
David Ralph
2022-08-26 10:45:32 +01:00
parent cd311e0fa1
commit 2c2acbba46
71 changed files with 1028 additions and 999 deletions

View File

@@ -244,13 +244,13 @@ export default class Background extends PureComponent {
return setFavourited(photofavourited);
}
const photoPack = [];
const installed = JSON.parse(localStorage.getItem('installed'));
installed.forEach(item => {
if (item.type === 'photos') {
photoPack.push(...item.photos)
}
});
const photoPack = [];
const installed = JSON.parse(localStorage.getItem('installed'));
installed.forEach((item) => {
if (item.type === 'photos') {
photoPack.push(...item.photos);
}
});
if (photoPack) {
const randomPhoto = photoPack[Math.floor(Math.random() * photoPack.length)];
return this.setState({