fix: search results not loading until stopped (#391)

This commit is contained in:
Ulaş Özgüler 2022-03-12 22:48:55 +03:00 committed by Daan Wijns
parent 84750af3d4
commit 8b126d8df5
2 changed files with 3 additions and 4 deletions

View file

@ -150,8 +150,8 @@ export default {
if (status === 'Stopped') {
clearInterval(this.search.interval)
this.search.interval = null
await this.getResults()
}
await this.getResults()
}, 500)
}
},
@ -165,13 +165,13 @@ export default {
async getResults() {
const data = await qbit.getSearchResults(this.search.id)
this.search.results = data.results
this.loading = false
},
downloadTorrent(item) {
this.createModal('addModal', { initialMagnet: item.fileUrl })
},
stopSearch() {
qbit.stopSearch(this.search.id)
this.loading = false
},
close() {
this.dialog = false

View file

@ -393,8 +393,7 @@ class Qbit {
getSearchResults(id) {
return this.execute('post', '/search/results', {
id,
limit: 50
id
})
}
}