on xenial help sign in
Further tweak the Loader for the SwipeToAct-widget.
commit5a66853c190f83fc4ec22e5f08441b24a980257d authorMirco Müller <mirco.mueller@canonical.com> dateWed 29 Oct 2014, 16:00 (12 years ago) parent69b793f
1 file changed+13−16
qml/Notifications/Notification.qml+13−16
qml/Notifications/Notification.qml+13−16
@@ -406,25 +406,21 @@ Item {
406406
407407 Loader {
408408 id: notifySwipeButtonLoader
409+ active: notification.hints["x-canonical-snap-decisions-swipe"] === "true"
410+
411+ sourceComponent: SwipeToAct {
412+ objectName: "notify_swipe_button"
413+ width: buttonRow.width
414+ leftIconName: "call-end"
415+ rightIconName: "call-start"
416+ onLeftTriggered: {
417+ notification.notification.invokeAction(notification.actions.data(0, ActionModel.RoleActionId))
418+ }
409419
410− Component {
411− id: notifySwipeButton
412−
413− SwipeToAct {
414− objectName: "notify_swipe_button"
415− width: buttonRow.width
416− leftIconName: "call-end"
417− rightIconName: "call-start"
418− onLeftTriggered: {
419− notification.notification.invokeAction(notification.actions.data(0, ActionModel.RoleActionId))
420− }
421−
422− onRightTriggered: {
423− notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId))
424− }
420+ onRightTriggered: {
421+ notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId))
425422 }
426423 }
427− sourceComponent: notification.hints["x-canonical-snap-decisions-swipe"] === "true" ? notifySwipeButton : undefined
428424 }
429425
430426 Repeater {
@@ -435,6 +431,7 @@ Item {
435431
436432 property string actionId: id
437433 property string actionLabel: label
434+ active: !notifySwipeButtonLoader.active
438435
439436 Component {
440437 id: actionButton