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 {
|
actions.left: Kirigami.Action {
|
||||||
text: !entry.queueStatus ? i18n("Add to queue") : i18n("Remove from Queue")
|
text: !entry.queueStatus ? i18n("Add to queue") : i18n("Remove from Queue")
|
||||||
icon.name: !entry.queueStatus ? "media-playlist-append" : "list-remove"
|
icon.name: !entry.queueStatus ? "media-playlist-append" : "list-remove"
|
||||||
visible: entry.enclosure
|
visible: entry.enclosure || entry.queueStatus
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
if(!entry.queueStatus) {
|
if(!entry.queueStatus) {
|
||||||
entry.queueStatus = true
|
entry.queueStatus = true
|
||||||
} else {
|
} else {
|
||||||
// first change to next track if this one is playing
|
// first change to next track if this one is playing
|
||||||
if (entry === audio.entry) {
|
if (entry.hasEnclosure && entry === audio.entry) {
|
||||||
audio.next()
|
audio.next()
|
||||||
}
|
}
|
||||||
entry.queueStatus = false
|
entry.queueStatus = false
|
||||||
|
@ -162,6 +162,14 @@ Kirigami.SwipeListItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
actions: [
|
actions: [
|
||||||
|
Kirigami.Action {
|
||||||
|
text: i18n("Remove from Queue")
|
||||||
|
icon.name: "list-remove"
|
||||||
|
onTriggered: {
|
||||||
|
entry.queueStatus = false;
|
||||||
|
}
|
||||||
|
visible: !entry.enclosure && entry.queueStatus
|
||||||
|
},
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18n("Download")
|
text: i18n("Download")
|
||||||
icon.name: "download"
|
icon.name: "download"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user