If refactoring is so good, why isn't there refactoring 2?
This commit is contained in:
parent
3afad74579
commit
bdc1e9d9c6
|
@ -168,7 +168,14 @@ const Search = {
|
||||||
skipMediaSearch = true
|
skipMediaSearch = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!loadedInitially &&
|
||||||
|
Object.values(data).some((result) => result.length > 0)
|
||||||
|
) {
|
||||||
|
// Show results on the first meaningful response
|
||||||
this.loadedInitially = true
|
this.loadedInitially = true
|
||||||
|
}
|
||||||
|
|
||||||
if (searchType === 'statuses') {
|
if (searchType === 'statuses') {
|
||||||
// Offset from whatever we already have
|
// Offset from whatever we already have
|
||||||
|
@ -179,19 +186,10 @@ const Search = {
|
||||||
this.mediaOffset = this.media.length
|
this.mediaOffset = this.media.length
|
||||||
this.lastMediaFetchCount = this.media.length - oldMediaLength
|
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.lastQuery = query
|
||||||
|
this.loadedInitially = true
|
||||||
this.loading = false
|
this.loading = false
|
||||||
},
|
},
|
||||||
resultCount (tabName) {
|
resultCount (tabName) {
|
||||||
|
|
Loading…
Reference in New Issue