Add actions to be able to remove non-podcast entries from queue
This commit is contained in:
parent
36ad248e55
commit
9b7d943a89
@ -99,13 +99,13 @@ Kirigami.ScrollablePage {
|
||||
actions.left: Kirigami.Action {
|
||||
text: !entry.queueStatus ? i18n("Add to queue") : i18n("Remove from Queue")
|
||||
icon.name: !entry.queueStatus ? "media-playlist-append" : "list-remove"
|
||||
visible: entry.enclosure
|
||||
visible: entry.enclosure || entry.queueStatus
|
||||
onTriggered: {
|
||||
if(!entry.queueStatus) {
|
||||
entry.queueStatus = true
|
||||
} else {
|
||||
// first change to next track if this one is playing
|
||||
if (entry === audio.entry) {
|
||||
if (entry.hasEnclosure && entry === audio.entry) {
|
||||
audio.next()
|
||||
}
|
||||
entry.queueStatus = false
|
||||
|
@ -162,6 +162,14 @@ Kirigami.SwipeListItem {
|
||||
}
|
||||
|
||||
actions: [
|
||||
Kirigami.Action {
|
||||
text: i18n("Remove from Queue")
|
||||
icon.name: "list-remove"
|
||||
onTriggered: {
|
||||
entry.queueStatus = false;
|
||||
}
|
||||
visible: !entry.enclosure && entry.queueStatus
|
||||
},
|
||||
Kirigami.Action {
|
||||
text: i18n("Download")
|
||||
icon.name: "download"
|
||||
|
Loading…
x
Reference in New Issue
Block a user