Compare commits
2 Commits
88d9ee9904
...
3afad74579
Author | SHA1 | Date |
---|---|---|
itepechi | 3afad74579 | |
itepechi | 71b0ee672e |
|
@ -153,13 +153,6 @@ const Search = {
|
|||
'followingOnly' in this.filter && this.filter.followingOnly
|
||||
})
|
||||
|
||||
for (const value of Object.values(data)) {
|
||||
if (value.length) {
|
||||
this.loading = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Always append to old results. If new results are empty, this doesn't change anything
|
||||
this.userIds = this.userIds.concat(map(data.accounts, 'id'))
|
||||
this.statuses = uniqBy(this.statuses.concat(data.statuses), 'id')
|
||||
|
@ -182,11 +175,20 @@ const Search = {
|
|||
this.statusesOffset = this.statuses.length
|
||||
// Because the amount of new statuses can actually be zero, compare to old length instead
|
||||
this.lastStatusFetchCount = this.statuses.length - oldStatusesLength
|
||||
}
|
||||
if (searchType === 'media') {
|
||||
} else if (searchType === 'media') {
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue