mirror of
https://github.com/KDE/kasts.git
synced 2025-01-29 00:30:03 +01:00
Fix switch to next track on removing currently playing track from Queue
This commit is contained in:
parent
07afc98978
commit
da456a19f9
@ -49,11 +49,12 @@ Kirigami.ScrollablePage {
|
||||
Connections {
|
||||
target: entry
|
||||
function onQueueStatusChanged() {
|
||||
console.log(entry, entry.queueStatus, pageStack.get(0).lastEntry, entry.id)
|
||||
if (entry.queueStatus === false) {
|
||||
// this entry has just been removed from the queue
|
||||
if (pageStack.depth > 1) {
|
||||
if (pageStack.get(0).lastEntry) {
|
||||
if (pageStack.get(0).lastEntry === entry.id) {
|
||||
// if this EntryPage was open, then close it
|
||||
pageStack.pop()
|
||||
}
|
||||
}
|
||||
@ -99,6 +100,10 @@ Kirigami.ScrollablePage {
|
||||
if(!entry.queueStatus) {
|
||||
entry.queueStatus = true
|
||||
} else {
|
||||
// first change to next track if this one is playing
|
||||
if (entry === audio.entry) {
|
||||
audio.next()
|
||||
}
|
||||
entry.queueStatus = false
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user