Compare commits
No commits in common. "d5c74cccbded703163dc67996daaf984c9b8550d" and "c578846b98dcbeb506b600dc75f528f4a4b18400" have entirely different histories.
d5c74cccbd
...
c578846b98
2 changed files with 1 additions and 16 deletions
|
@ -29,7 +29,6 @@ const Search = {
|
|||
],
|
||||
data () {
|
||||
return {
|
||||
queryCount: 0,
|
||||
loadedInitially: false,
|
||||
loading: Object.fromEntries(
|
||||
allSearchTypes.map((searchType) => [searchType, false])
|
||||
|
@ -106,8 +105,6 @@ const Search = {
|
|||
return
|
||||
}
|
||||
|
||||
const localQueryCount = ++this.queryCount
|
||||
|
||||
const isNewSearch = this.lastQuery !== query
|
||||
this.$refs.searchInput.blur()
|
||||
if (isNewSearch) {
|
||||
|
@ -165,11 +162,6 @@ const Search = {
|
|||
local: 'localOnly' in this.filter && this.filter.localOnly
|
||||
})
|
||||
|
||||
if (localQueryCount !== this.queryCount) {
|
||||
// Query count differs, there should be a newer query
|
||||
return
|
||||
}
|
||||
|
||||
// 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')
|
||||
|
@ -190,11 +182,6 @@ const Search = {
|
|||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
if (localQueryCount !== this.queryCount) {
|
||||
// Skip cleanups if there's a newer query
|
||||
return
|
||||
}
|
||||
|
||||
if (!this.loadedInitially && this.hasAtLeastOneResult) {
|
||||
// Show results on the first meaningful response
|
||||
this.loadedInitially = true
|
||||
|
|
|
@ -51,9 +51,7 @@ const SearchBar = {
|
|||
event.isComposing ||
|
||||
event.metaKey ||
|
||||
event.repeat ||
|
||||
event.shiftKey ||
|
||||
// not very vue-esque, but as long as it works
|
||||
document.querySelector('.modal-view.modal-background.open')
|
||||
event.shiftKey
|
||||
) {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue