@@ -55,29 +55,11 @@ StyledItem {
55 name: "Ubuntu.Components.Themes.Ambiance"
55 name: "Ubuntu.Components.Themes.Ambiance"
60− readonly property bool expanded: {
58+ readonly property bool expanded: type === Notification.SnapDecision && // expand only snap decisions, if...
61− var result = false;
59+ (fullscreen || // - it's a fullscreen one
63− if (type === Notification.SnapDecision) {
64− if (ListView.view.currentIndex === index || fullscreen) {
60+ ListView.view.currentIndex === index || // - it's the one the user clicked on
67− if (ListView.view.count > 2) {
68− if (ListView.view.currentIndex === -1 && index == 1) {
61+ (ListView.view.currentIndex === -1 && index == 0) // - the first one after the user closed the previous one
82 NotificationAudio {
64 NotificationAudio {
@@ -116,6 +98,13 @@ StyledItem {
102+ target: ListView.view
103+ property: "topmostIsFullscreen"
119 function closeNotification() {
108 function closeNotification() {
120 if (index === ListView.view.currentIndex) { // reset to get the 1st snap decision expanded
109 if (index === ListView.view.currentIndex) { // reset to get the 1st snap decision expanded
121 ListView.view.currentIndex = -1;
110 ListView.view.currentIndex = -1;
@@ -125,7 +114,6 @@ StyledItem {
125 notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId));
114 notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId));
127 notification.notification.close();
116 notification.notification.close();
128− notification.dismissed()
131 Behavior on x {
119 Behavior on x {
@@ -144,7 +132,8 @@ StyledItem {
147− Behavior on height {
135+ Behavior on implicitHeight {
136+ enabled: !fullscreen
148 UbuntuNumberAnimation {
137 UbuntuNumberAnimation {
149 duration: UbuntuAnimation.SnapDuration
138 duration: UbuntuAnimation.SnapDuration
@@ -217,7 +206,6 @@ StyledItem {
217 onNameOwnerChanged: {
206 onNameOwnerChanged: {
218 if (lastNameOwner !== "" && nameOwner === "" && notification.notification !== undefined) {
207 if (lastNameOwner !== "" && nameOwner === "" && notification.notification !== undefined) {
219 notification.notification.close()
208 notification.notification.close()
220− notification.dismissed()
222 lastNameOwner = nameOwner
210 lastNameOwner = nameOwner
@@ -443,7 +431,6 @@ StyledItem {
444 onAccepted: {
432 onAccepted: {
445 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
433 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
446− notification.dismissed()