summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Rosca <nowrep@gmail.com>2017-01-01 15:35:12 (GMT)
committerDavid Rosca <nowrep@gmail.com>2017-01-10 15:28:45 (GMT)
commitb2c6aa5b3499ee020b37083d67e742d912502b33 (patch)
tree9e29b0a657f08b9351b57949861d27cd67d437d5
parent19a88030d3de12a96402a1103c964e5a7363646c (diff)
MediaController: Update position while queuedPositionUpdate timer is running
Also don't try to call SetPosition when position didn't change. Fixes sometimes reseting position to 0 after expanding applet. Differential Revision: https://phabricator.kde.org/D3904
-rw-r--r--applets/mediacontroller/contents/ui/ExpandedRepresentation.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/applets/mediacontroller/contents/ui/ExpandedRepresentation.qml b/applets/mediacontroller/contents/ui/ExpandedRepresentation.qml
index e65f711..ea1bd03 100644
--- a/applets/mediacontroller/contents/ui/ExpandedRepresentation.qml
+++ b/applets/mediacontroller/contents/ui/ExpandedRepresentation.qml
@@ -56,7 +56,7 @@ Item {
onPositionChanged: {
// we don't want to interrupt the user dragging the slider
- if (!seekSlider.pressed && !keyPressed && !queuedPositionUpdate.running) {
+ if (!seekSlider.pressed && !keyPressed) {
// we also don't want passive position updates
disablePositionUpdate = true
seekSlider.value = position
@@ -254,6 +254,9 @@ Item {
id: queuedPositionUpdate
interval: 100
onTriggered: {
+ if (position == seekSlider.value) {
+ return;
+ }
var service = mpris2Source.serviceForSource(mpris2Source.current)
var operation = service.operationDescription("SetPosition")
operation.microseconds = seekSlider.value