Bug fixes
This commit is contained in:
1 parent
6ec392a4fe
commit
4428baae41
2 files changed
+22
-2
No files matched your search
@@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Bug where logging in causes issues if a video is already playing
|
||||
- Bug where casting from web app while playing a video from the search
|
||||
- Spinner for the video
|
||||
- Bug where search sugggestions selected index is higher than total count
|
||||
- Race condition where button group gains focus before suggestions are set in Search Page
|
||||
|
||||
## [0.4.0] - 2022-11-24
|
||||
### Added
|
||||
|
||||
@@ -29,6 +29,9 @@ function OnFocusChange() as void
|
||||
return
|
||||
end if
|
||||
if m.suggestions.buttons.Count() > 0
|
||||
if m.suggestions.buttonFocused >= m.suggestions.buttons.Count()
|
||||
m.suggestions.focusButton = 0
|
||||
end if
|
||||
m.suggestions.SetFocus(true)
|
||||
return
|
||||
end if
|
||||
@@ -57,8 +60,19 @@ function OnTextChange() as void
|
||||
if q.len() > 0 and ArrayIndexOf(suggestions, q) = -1
|
||||
suggestions.Unshift(q)
|
||||
end if
|
||||
' TODO: fix race condition where button group gains focus before suggestions are set
|
||||
|
||||
' Capture current focused button and restore it after resetting the buttons
|
||||
buttonFocused = -1
|
||||
if IsNodeFocused("suggestions")
|
||||
buttonFocused = m.suggestions.buttonFocused
|
||||
end if
|
||||
if buttonFocused >= m.suggestions.buttons.Count()
|
||||
buttonFocused = m.suggestions.buttons.Count() -1
|
||||
end if
|
||||
m.suggestions.buttons = suggestions
|
||||
if buttonFocused <> -1
|
||||
m.suggestions.focusButton = buttonFocused
|
||||
end if
|
||||
end if
|
||||
end function)
|
||||
end function
|
||||
@@ -69,7 +83,11 @@ function OnSearchButtonSelected()
|
||||
Search(text)
|
||||
end function
|
||||
|
||||
function OnSearchButtonFocused()
|
||||
function OnSearchButtonFocused() as void
|
||||
if not IsNodeFocused("suggestions")
|
||||
return
|
||||
end if
|
||||
|
||||
selected = m.suggestions.buttonFocused
|
||||
text = m.suggestions.buttons[selected]
|
||||
m.keyboard.text = text
|
||||
|
||||
Reference in new issue
Block a user