Skip to content

Commit 35d9c84

Browse files
committed
Update code docs
1 parent 26df5bb commit 35d9c84

4 files changed

Lines changed: 20 additions & 5 deletions

File tree

docs/components_tvshows_TVSeasonRow.bs.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
itemHeight = 320 ' width * 1.5 + text
1616

1717
m.top.showRowLabel = [false]
18-
m.top.translation = [0, 610]
18+
m.top.translation = [0, 575]
1919
' rows take up full width of the screen
2020
m.top.itemSize = [1920, (itemHeight + 40)]
2121
' size of the item in the row

docs/components_tvshows_TVShowDetails.bs.html

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
m.log = log.Logger("TVShowDetails")
1010
m.top.optionsAvailable = false
1111
main = m.top.findNode("toplevel")
12-
main.translation = [96, 175]
12+
main.translation = [96, 150]
1313
m.tvshowPoster = m.top.findNode("tvshowPoster")
1414
m.extrasSlider = m.top.findNode("tvSeasonExtras")
1515
m.getShuffleEpisodesTask = createObject("roSGNode", "getShuffleEpisodesTask")
@@ -44,12 +44,27 @@
4444

4545
' Restore focus for scene navigation
4646
if isValid(m.top.lastFocus)
47-
m.top.lastFocus.setFocus(true)
47+
' Check if the focus target has a ready field (e.g., TextButton) and is not yet ready
48+
if m.top.lastFocus.hasField("ready") and not m.top.lastFocus.ready
49+
' Component not ready yet, observe and set focus when ready
50+
m.top.lastFocus.observeField("ready", "onLastFocusReady")
51+
else
52+
' Component is ready or doesn't need readiness check, set focus immediately
53+
m.top.lastFocus.setFocus(true)
54+
end if
4855
else
4956
m.top.setFocus(true)
5057
end if
5158
end sub
5259

60+
sub onLastFocusReady()
61+
' Called when the last focus target becomes ready
62+
if isValid(m.top.lastFocus) and m.top.lastFocus.ready
63+
m.top.lastFocus.unobserveField("ready")
64+
m.top.lastFocus.setFocus(true)
65+
end if
66+
end sub
67+
5368
sub itemContentChanged()
5469
' Updates video metadata
5570
' TODO - make things use item rather than itemData

docs/data/search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/module-TVShowDetails.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)