* Play queue notification * Lint fix * change binding * Add notification preference * Lint fix * changelog --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
29 lines
1017 B
Plaintext
29 lines
1017 B
Plaintext
namespace PlayQueue
|
|
const NOTIFICATION_NODE_ID = "PlayQueueNotification"
|
|
|
|
function ShowNotifcation(notifications as object, contentNode as object) as void
|
|
notification = notifications.findNode(NOTIFICATION_NODE_ID)
|
|
if notification = invalid
|
|
notification = notifications.createChild("PlayQueueNotification")
|
|
notification.id = NOTIFICATION_NODE_ID
|
|
end if
|
|
notification.content = contentNode
|
|
notification.show = true
|
|
end function
|
|
|
|
function RemoveNotifcation(notifications as object) as void
|
|
notification = notifications.findNode(NOTIFICATION_NODE_ID)
|
|
if notification <> invalid
|
|
notifications.RemoveChild(notification)
|
|
end if
|
|
end function
|
|
|
|
function SetVisible(notifications as object, visible as boolean)
|
|
notification = notifications.findNode(NOTIFICATION_NODE_ID)
|
|
if notification <> invalid
|
|
notification.visible = visible
|
|
end if
|
|
end function
|
|
|
|
end namespace
|