@@ -59,6 +59,8 @@ GenericPreview {
5959 objectName: "audioPlayer"
6060 property real percent: audioPlayer.position * 100 / audioPlayer.duration
6161
62+ property Item playingItem
63+
6264 Component.onDestruction: {
6365 audioPlayer.stop();
6466 }
@@ -78,11 +80,11 @@ GenericPreview {
7880
7981 Column {
8082 anchors { left: parent.left; right: parent.right }
83+ visible: trackRepeater.count > 0
8184
8285 ThinDivider {
8386 objectName: "topDivider"
8487 anchors { left: parent.left; right: parent.right }
85− visible: trackRepeater.count > 0
8688 }
8789
8890 Repeater {
@@ -96,19 +98,14 @@ GenericPreview {
9698 objectName: "trackItem" + index
9799 width: parent.width
98100 height: units.gu(5)
99− property bool isPlayingItem: false
100−
101− Connections {
102− target: audioPlayer
103− onSourceChanged: trackItem.isPlayingItem = false;
104− }
101+ property bool isPlayingItem: audioPlayer.playingItem == trackItem
105102
106103 function play() {
107104 audioPlayer.stop();
108105 // Make sure we change the source, even if two items point to the same uri location
109106 audioPlayer.source = "";
110107 audioPlayer.source = model.uri;
111− isPlayingItem = true;
108+ audioPlayer.playingItem = trackItem;
112109 audioPlayer.play();
113110 }
114111