Delete items on remove without waiting for a response

This commit is contained in:
RemixDev 2020-09-15 17:37:17 +02:00
parent 8a2ec29b63
commit 10715f68dc
2 changed files with 7 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -91,6 +91,11 @@ export default {
switch (icon) {
case 'remove':
socket.emit('removeFromQueue', uuid)
if ($(`#bar_${uuid}`).hasClass('indeterminate')){
$(`#download_${uuid}`).remove()
}else{
target.innerHTML = `<div class="circle-loader"></div>`
}
break
default:
}
@ -251,7 +256,7 @@ export default {
if (index > -1) {
this.queue.splice(index, 1)
$(`#download_${this.queueList[uuid].uuid}`).remove()
$(`#download_${uuid}`).remove()
delete this.queueList[uuid]
}
},