diff --git a/src/components/search/search.js b/src/components/search/search.js index de7578c4..61a4dae2 100644 --- a/src/components/search/search.js +++ b/src/components/search/search.js @@ -168,7 +168,14 @@ const Search = { skipMediaSearch = true } } - this.loadedInitially = true + + if ( + !loadedInitially && + Object.values(data).some((result) => result.length > 0) + ) { + // Show results on the first meaningful response + this.loadedInitially = true + } if (searchType === 'statuses') { // Offset from whatever we already have @@ -179,19 +186,10 @@ const Search = { this.mediaOffset = this.media.length this.lastMediaFetchCount = this.media.length - oldMediaLength } - - if (searchTypes.length > 1) { - for (const value of Object.values(data)) { - if (value.length) { - // Show results on the first meaningful response - this.loading = false - break - } - } - } } this.lastQuery = query + this.loadedInitially = true this.loading = false }, resultCount (tabName) {