@@ -21,7 +21,6 @@ import Ubuntu.Components 1.2
2121import Unity.Notifications 1.0
2222import QMenuModel 0.1
2323import Utils 0.1
24−import "../Components/UnityInputInfo"
2524import Ubuntu.Components.ListItems 0.1 as ListItem
2625
2726Item {
@@ -61,12 +60,12 @@ Item {
6160 state: {
6261 var result = "";
6362
64− if (type === Notification.SnapDecision) {
65− if (ListView.view.currentIndex === index) {
63+ if (type == Notification.SnapDecision) {
64+ if (ListView.view.currentIndex == index) {
6665 result = "expanded";
6766 } else {
6867 if (ListView.view.count > 2) {
69− if (ListView.view.currentIndex === -1 && index == 1) {
68+ if (ListView.view.currentIndex == -1 && index == 1) {
7069 result = "expanded";
7170 } else {
7271 result = "contracted";
@@ -84,7 +83,7 @@ Item {
8483 id: sound
8584 objectName: "sound"
8685 audioRole: MediaPlayer.alert
87− source: hints["suppress-sound"] !== "true" && !!hints["sound-file"] ? hints["sound-file"] : ""
86+ source: hints["suppress-sound"] !== "true" && hints["sound-file"] !== undefined ? hints["sound-file"] : ""
8887 }
8988
9089 Component.onCompleted: {
@@ -141,7 +140,7 @@ Item {
141140
142141 clip: fullscreen ? false : true
143142
144− visible: type !== Notification.PlaceHolder
143+ visible: type != Notification.PlaceHolder
145144
146145 UbuntuShape {
147146 id: shapedBack
@@ -197,7 +196,7 @@ Item {
197196 actions: paths.actions
198197 menuObjectPath: paths.menuObjectPath
199198 onNameOwnerChanged: {
200− if (lastNameOwner !== "" && nameOwner === "" && !!notification.notification) {
199+ if (lastNameOwner !== "" && nameOwner === "" && notification.notification !== undefined) {
201200 notification.notification.close()
202201 }
203202 lastNameOwner = nameOwner
@@ -216,7 +215,7 @@ Item {
216215 drag.maximumX: notification.width
217216
218217 onClicked: {
219− if (notification.type === Notification.Interactive) {
218+ if (notification.type == Notification.Interactive) {
220219 notification.notification.invokeAction(actionRepeater.itemAt(0).actionId)
221220 } else if (clickToClose && canBeClosed) {
222221 notification.notification.close()
@@ -260,10 +259,10 @@ Item {
260259 id: icon
261260
262261 objectName: "icon"
263− width: type === Notification.Ephemeral && !bodyLabel.visible ? units.gu(3) : units.gu(6)
262+ width: type == Notification.Ephemeral && !bodyLabel.visible ? units.gu(3) : units.gu(6)
264263 height: width
265− shaped: notification.hints["x-canonical-non-shaped-icon"] === "true" ? false : true
266− visible: !!iconSource && iconSource !== "" && type !== Notification.Confirmation
264+ shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
265+ visible: iconSource !== undefined && iconSource !== "" && type !== Notification.Confirmation
267266 }
268267
269268 Column {
@@ -299,7 +298,7 @@ Item {
299298 fontSize: "small"
300299 color: darkOnBright ? sdFontColor : Theme.palette.selected.backgroundText
301300 wrapMode: Text.WordWrap
302− maximumLineCount: type === Notification.SnapDecision ? 12 : 2
301+ maximumLineCount: type == Notification.SnapDecision ? 12 : 2
303302 elide: Text.ElideRight
304303 textFormat: Text.StyledText
305304 }
@@ -317,7 +316,7 @@ Item {
317316 }
318317
319318 ListItem.ThinDivider {
320− visible: type === Notification.SnapDecision
319+ visible: type == Notification.SnapDecision
321320 }
322321
323322 ShapedIcon {
@@ -325,9 +324,9 @@ Item {
325324 objectName: "centeredIcon"
326325 width: units.gu(5)
327326 height: width
328− shaped: notification.hints["x-canonical-non-shaped-icon"] === "true" ? false : true
327+ shaped: notification.hints["x-canonical-non-shaped-icon"] == "true" ? false : true
329328 fileSource: icon.fileSource
330− visible: !!fileSource && fileSource !== "" && type === Notification.Confirmation
329+ visible: fileSource !== undefined && fileSource !== "" && type === Notification.Confirmation
331330 anchors.horizontalCenter: parent.horizontalCenter
332331 }
333332
@@ -443,7 +442,7 @@ Item {
443442 objectName: "notify_oot_button" + index
444443 width: oneOverTwoCase.width
445444 text: oneOverTwoLoaderTop.actionLabel
446− color: notification.hints["x-canonical-private-affirmative-tint"] === "true" ? green : sdDarkGrey
445+ color: index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true" ? red : sdDarkGrey
447446 onClicked: notification.notification.invokeAction(oneOverTwoLoaderTop.actionId)
448447 }
449448 }
@@ -533,10 +532,10 @@ Item {
533532 text: loader.actionLabel
534533 color: {
535534 var result = sdDarkGrey;
536− if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] === "true") {
535+ if (index == 0 && notification.hints["x-canonical-private-affirmative-tint"] == "true") {
537536 result = green;
538537 }
539− if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] === "true") {
538+ if (index == 1 && notification.hints["x-canonical-private-rejection-tint"] == "true") {
540539 result = red;
541540 }
542541 return result;
@@ -559,7 +558,7 @@ Item {
559558 margins: contentSpacing
560559 }
561560
562− visible: notification.type === Notification.SnapDecision && actionRepeater.count > 3 && !oneOverTwoCase.visible
561+ visible: notification.type == Notification.SnapDecision && actionRepeater.count > 3 && !oneOverTwoCase.visible
563562 model: notification.actions
564563 expanded: false
565564 startIndex: 2