Play queue notification (#186)
* Play queue notification * Lint fix * change binding * Add notification preference * Lint fix * changelog --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
1 parent
777db66bda
commit
4233f30dec
14 files changed
+283
-63
No files matched your search
@@ -0,0 +1,28 @@
|
||||
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
|
||||
Reference in new issue
Block a user