Fixed issue with focus in the video queue view
This commit is contained in:
1 parent
4f32f0f70f
commit
36c67b97b2
2 files changed
+15
-3
No files matched your search
+3
-1
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- Nothing worth mentioning yet.
|
## Fixed
|
||||||
|
|
||||||
|
- Issue with focus in the video queue view
|
||||||
|
|
||||||
## [0.25.0] - 2024-07-22
|
## [0.25.0] - 2024-07-22
|
||||||
|
|
||||||
|
|||||||
@@ -49,12 +49,14 @@ function OnContentSet() as void
|
|||||||
end if
|
end if
|
||||||
|
|
||||||
index = content.index
|
index = content.index
|
||||||
|
videoCount = content.getChildCount()
|
||||||
if IsInt(index) and index <> -1
|
if IsInt(index) and index <> -1
|
||||||
m.queueLabel.text = Tr(Locale.VideoQueue.Queue) + ` (${index + 1}/${content.getChildCount()})`
|
m.queueLabel.text = Tr(Locale.VideoQueue.Queue) + ` (${index + 1}/${videoCount})`
|
||||||
else
|
else
|
||||||
m.queueLabel.text = Tr(Locale.VideoQueue.Queue) + ` (${content.getChildCount()})`
|
m.queueLabel.text = Tr(Locale.VideoQueue.Queue) + ` (${videoCount})`
|
||||||
end if
|
end if
|
||||||
|
|
||||||
|
AdjustFocus(videoCount)
|
||||||
LoadVideoDetailsIfNeeded()
|
LoadVideoDetailsIfNeeded()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
@@ -146,6 +148,14 @@ function LoadVideoDetailsIfNeeded() as void
|
|||||||
})
|
})
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function AdjustFocus(videoCount as integer)
|
||||||
|
hasVideos = videoCount > 0
|
||||||
|
if not hasVideos and m.queueList.hasFocus()
|
||||||
|
NodeSetFocus(m.clearButton, true)
|
||||||
|
end if
|
||||||
|
m.queueList.focusable = hasVideos
|
||||||
|
end function
|
||||||
|
|
||||||
function OnDispose()
|
function OnDispose()
|
||||||
m.queueList.content = invalid
|
m.queueList.content = invalid
|
||||||
DisposeObservers()
|
DisposeObservers()
|
||||||
|
|||||||
Reference in new issue
Block a user