Removed screen toast spam when adding more albums / tracks in one go

This commit is contained in:
RemixDev
2020-08-17 11:06:24 +02:00
parent ede8f7a6e1
commit 40c7ba9a0c
5 changed files with 22 additions and 14 deletions

View File

@@ -119,10 +119,6 @@ i /deep/ svg {
width: 20px;
}
.bitcoin /deep/ svg {
fill: #ff9900;
}
.ethereum /deep/ svg {
fill: var(--foreground);
}
@@ -196,14 +192,12 @@ ul {
</style>
<script>
import paypal from '@/assets/paypal.svg'
import bitcoin from '@/assets/bitcoin.svg'
import ethereum from '@/assets/ethereum.svg'
export default {
data: () => ({
paypal,
ethereum,
bitcoin
ethereum
})
}
</script>

View File

@@ -100,18 +100,18 @@ export default {
if (initQueueComplete.length) {
initQueueComplete.forEach(item => {
initQueueList[item].init = true
initQueueList[item].silent = true
this.addToQueue(initQueueList[item])
})
}
if (currentItem) {
initQueueList[currentItem].init = true
initQueueList[currentItem].silent = true
this.addToQueue(initQueueList[currentItem], true)
}
initQueue.forEach(item => {
initQueueList[item].init = true
initQueueList[item].silent = true
this.addToQueue(initQueueList[item])
})
@@ -121,6 +121,18 @@ export default {
}
},
addToQueue(queueItem, current = false) {
if (Array.isArray(queueItem)){
if (queueItem.length > 1){
queueItem.forEach((item, i) => {
item.silent = true
this.addToQueue(item)
});
toast(this.$t('toasts.addedMoreToQueue', [queueItem.length]), 'playlist_add_check')
return
}else{
queueItem = queueItem[0]
}
}
this.queueList[queueItem.uuid] = queueItem
if (queueItem.downloaded + queueItem.failed == queueItem.size) {
@@ -192,7 +204,7 @@ export default {
}
}
if (!queueItem.init) {
if (!queueItem.silent) {
toast(this.$t('toasts.addedToQueue', [queueItem.title]), 'playlist_add_check')
}
},