Don't try to fetch the initial unsplash results when unsplash backgrounds are disabled

This commit is contained in:
kolaente 2020-05-31 23:39:08 +02:00
parent 0b154936e7
commit 5a7c07ca4d
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -82,6 +82,9 @@
}, },
methods: { methods: {
newBackgroundSearch() { newBackgroundSearch() {
if (!this.unsplashBackgroundEnabled) {
return
}
// This is an extra method to reset a few things when searching to not break loading more photos. // This is an extra method to reset a few things when searching to not break loading more photos.
this.$set(this, 'backgroundSearchResult', []) this.$set(this, 'backgroundSearchResult', [])
this.$set(this, 'backgroundThumbs', {}) this.$set(this, 'backgroundThumbs', {})