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
|
'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
|
// 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.userIds = this.userIds.concat(map(data.accounts, 'id'))
|
||||||
this.statuses = uniqBy(this.statuses.concat(data.statuses), 'id')
|
this.statuses = uniqBy(this.statuses.concat(data.statuses), 'id')
|
||||||
|
@ -182,11 +175,20 @@ const Search = {
|
||||||
this.statusesOffset = this.statuses.length
|
this.statusesOffset = this.statuses.length
|
||||||
// Because the amount of new statuses can actually be zero, compare to old length instead
|
// Because the amount of new statuses can actually be zero, compare to old length instead
|
||||||
this.lastStatusFetchCount = this.statuses.length - oldStatusesLength
|
this.lastStatusFetchCount = this.statuses.length - oldStatusesLength
|
||||||
}
|
} else if (searchType === 'media') {
|
||||||
if (searchType === 'media') {
|
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue