Fix queue notification hint (#284)
* Fix queue notification hint * Lint fix * duplicate import --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
1 parent
b076517c1b
commit
11fb644fc6
4 files changed
+7
-2
No files matched your search
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [Attempt #2] to fix a crash caused by execution timeout when stopping a video takes too long
|
- [Attempt #2] to fix a crash caused by execution timeout when stopping a video takes too long
|
||||||
|
- Wrong hint on the "added to queue" notification when in fullscreen
|
||||||
|
|
||||||
## [0.19.1] - 2024-01-13
|
## [0.19.1] - 2024-01-13
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<field id="content" type="node" onChange="OnContentSet" />
|
<field id="content" type="node" onChange="OnContentSet" />
|
||||||
<field id="thumbnail" type="uri" alias="thumbnailPoster.uri" />
|
<field id="thumbnail" type="uri" alias="thumbnailPoster.uri" />
|
||||||
<field id="line1" type="string" alias="line1Label.text" />
|
<field id="line1" type="string" alias="line1Label.text" />
|
||||||
|
<field id="hintVisible" type="boolean" alias="hintLabel.visible" />
|
||||||
<field id="show" type="boolean" alwaysNotify="true" onChange="OnShow" />
|
<field id="show" type="boolean" alwaysNotify="true" onChange="OnShow" />
|
||||||
</interface>
|
</interface>
|
||||||
<children>
|
<children>
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
wrap="true" />
|
wrap="true" />
|
||||||
</LayoutGroup>
|
</LayoutGroup>
|
||||||
<Label
|
<Label
|
||||||
|
id="hintLabel"
|
||||||
width="480"
|
width="480"
|
||||||
font="font:SmallestSystemFont"
|
font="font:SmallestSystemFont"
|
||||||
color="0x262626ff"
|
color="0x262626ff"
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
namespace PlayQueue
|
namespace PlayQueue
|
||||||
const NOTIFICATION_NODE_ID = "PlayQueueNotification"
|
const NOTIFICATION_NODE_ID = "PlayQueueNotification"
|
||||||
|
|
||||||
function ShowNotifcation(notifications as object, contentNode as object) as void
|
function ShowNotifcation(notifications as object, contentNode as object, hintVisible as boolean) as void
|
||||||
notification = notifications.findNode(NOTIFICATION_NODE_ID)
|
notification = notifications.findNode(NOTIFICATION_NODE_ID)
|
||||||
if notification = invalid
|
if notification = invalid
|
||||||
notification = notifications.createChild("PlayQueueNotification")
|
notification = notifications.createChild("PlayQueueNotification")
|
||||||
notification.id = NOTIFICATION_NODE_ID
|
notification.id = NOTIFICATION_NODE_ID
|
||||||
end if
|
end if
|
||||||
notification.content = contentNode
|
notification.content = contentNode
|
||||||
|
notification.hintVisible = hintVisible
|
||||||
notification.show = true
|
notification.show = true
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ function AddToQueue(node as object)
|
|||||||
m.content.appendChild(node)
|
m.content.appendChild(node)
|
||||||
queueNotifications = m.top.preferences["misc.queue_notifications"]
|
queueNotifications = m.top.preferences["misc.queue_notifications"]
|
||||||
if queueNotifications
|
if queueNotifications
|
||||||
PlayQueue.ShowNotifcation(m.top.notifications, node)
|
hintVisible = VideoUtils.GetVideoPlayer() = invalid or not VideoUtils.IsVideoPlayerFullScreen()
|
||||||
|
PlayQueue.ShowNotifcation(m.top.notifications, node, hintVisible)
|
||||||
end if
|
end if
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user