Adjust lounge notification

This commit is contained in:
Brahim Hadriche committed 2024-02-21 19:27:54 -05:00
1 parent b52cd6f01b
commit 37dde57c67
3 files changed
+20 -14

No files matched your search

@@ -1,20 +1,23 @@
namespace LoungeDeviceConnected
const NOTIFICATION_NODE_ID = "DeviceConnectedNotification"
function ShowNotifcation(notifications as object, name as dynamic, thumbnail as dynamic) as void
function ShowNotifcation(notifications as object, deviceName as dynamic, userName as dynamic, userAvatarUri as dynamic) as void
notification = notifications.findNode(NOTIFICATION_NODE_ID)
if notification = invalid
notification = notifications.createChild("DeviceConnectedNotification")
notification.id = NOTIFICATION_NODE_ID
end if
if StringUtils.IsNullOrEmpty(name)
name = "Device"
if StringUtils.IsNullOrEmpty(deviceName)
deviceName = "Device"
end if
notification.line1 = name
if StringUtils.IsNullOrEmpty(thumbnail)
thumbnail = "pkg:/images/icons/user.png"
if StringUtils.IsNullOrEmpty(userAvatarUri)
userAvatarUri = "pkg:/images/icons/user.png"
end if
notification.thumbnail = thumbnail
notification.line1 = deviceName
notification.line2 = userName
notification.thumbnail = userAvatarUri
notification.show = true
end function