Commit 2552e7bb authored by Nate Graham's avatar Nate Graham
Browse files

Only show drag handles when the playlist contains more then one song

If there's only one song, you couldn't drag it anywhere anyway.
parent b4d6864a
Pipeline #140678 passed with stage
in 3 minutes and 37 seconds
......@@ -163,6 +163,7 @@ Kirigami.Page {
isPlaying: model.isPlaying
metadataModifiableRole: model && model.metadataModifiableRole ? model.metadataModifiableRole : false
listView: playListView
showDragHandle: playListView.count > 1
}
}
......@@ -279,6 +280,7 @@ Kirigami.Page {
isPlaying: model ? model.isPlaying : false
metadataModifiableRole: model && model.metadataModifiableRole ? model.metadataModifiableRole : false
hideDiscNumber: model && model.isSingleDiscAlbum
showDragHandle: playListView.count > 1
listView: playListView
......
......@@ -61,7 +61,7 @@ BasePlayListDelegate {
spacing: Kirigami.Units.smallSpacing / 2
Loader {
active: !simpleMode
active: !simpleMode && playListEntry.showDragHandle
sourceComponent: Kirigami.ListItemDragHandle {
listItem: playListEntry
listView: playListEntry.listView
......
......@@ -73,6 +73,7 @@ BasePlayListDelegate {
// drag handle (for list reordering)
Kirigami.ListItemDragHandle {
visible: playListEntry.showDragHandle
listItem: playListEntry
listView: playListEntry.listView
onMoveRequested: ElisaApplication.mediaPlayListProxyModel.moveRow(oldIndex, newIndex)
......
......@@ -36,6 +36,7 @@ Kirigami.AbstractListItem {
property var listView
property bool simpleMode: false
property bool showDragHandle: true
signal startPlayback()
signal pausePlayback()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment