mirror of
https://github.com/mue/mue.git
synced 2026-06-11 19:18:57 +02:00
feat: don't get the same image twice in a row
Works with Mue API only, not Unsplash and not photo packs.
This commit is contained in:
@@ -94,7 +94,13 @@ export default class Background extends PureComponent {
|
||||
|
||||
const backgroundAPI = localStorage.getItem('backgroundAPI');
|
||||
const apiQuality = localStorage.getItem('apiQuality');
|
||||
const backgroundExclude = JSON.parse(localStorage.getItem('backgroundExclude'));
|
||||
let backgroundExclude = JSON.parse(localStorage.getItem('backgroundExclude'));
|
||||
if (!Array.isArray(backgroundExclude)) {
|
||||
backgroundExclude = [];
|
||||
}
|
||||
if (this.state.photoInfo.pun) {
|
||||
backgroundExclude.push(this.state.photoInfo.pun)
|
||||
}
|
||||
|
||||
let requestURL, data;
|
||||
switch (backgroundAPI) {
|
||||
|
||||
Reference in New Issue
Block a user