@@ -41,11 +41,18 @@ ListView {
4141 filterRegExp: RegExp(UnityNotifications.Notification.SnapDecision)
4242 }
4343
44− property bool topmostIsFullscreen: false
44+ readonly property bool topmostIsFullscreen: fullscreenIndex != -1
4545 spacing: topmostIsFullscreen ? 0 : units.gu(1)
4646
4747 currentIndex: count > 1 ? 1 : -1
4848
49+ property int fullscreenIndex: -1
50+ onFullscreenIndexChanged: {
51+ if (fullscreenIndex != -1) {
52+ positionViewAtIndex(fullscreenIndex, ListView.Beginning);
53+ }
54+ }
55+
4956 delegate: Notification {
5057 objectName: "notification" + index
5158 width: parent.width
@@ -69,18 +76,18 @@ ListView {
6976 // FIXME: disabled all transitions because of LP: #1354406 workaround
7077 //layer.enabled: add.running || remove.running || populate.running
7178
72− readonly property int theIndex: index
73− onTheIndexChanged: updateListTopMostIsFullscreen();
74− Component.onCompleted: updateListTopMostIsFullscreen();
7579 onFullscreenChanged: updateListTopMostIsFullscreen();
7680
7781 function updateListTopMostIsFullscreen() {
78− if (fullscreen) { // effectively hide any non-fullscreen snaps
79− notificationList.positionViewAtIndex(index, ListView.Beginning);
82+ if (fullscreen) {
83+ fullscreenIndex = index;
8084 }
81− // index 1 because 0 is the PlaceHolder...
82− if (index == 1) {
83− notificationList.topmostIsFullscreen = fullscreen
85+ }
86+
87+ onDismissed: {
88+ if (fullscreenIndex == index) {
89+ fullscreenIndex = -1;
90+ notificationList.positionViewAtBeginning();
8491 }
8592 }
8693 }