Skip to content

Commit d14e667

Browse files
committed
Update code docs
1 parent 2b52397 commit d14e667

4 files changed

Lines changed: 30 additions & 2 deletions

docs/components_music_AlbumTrackList.bs.html

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

docs/components_music_AlbumView.bs.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
m.dscr = m.top.findNode("overview")
1818
m.dscr.ellipsisText = tr("... (Press * to read more)")
1919
createDialogPallete()
20+
21+
' Set initial focus to song list
22+
m.top.lastFocus = m.songList
2023
end sub
2124

2225
sub setupMainNode()
@@ -33,6 +36,13 @@
3336
end if
3437
end if
3538
' If pageContent not loaded, backdrop will be set in pageContentChanged()
39+
40+
' Restore focus to previously focused element
41+
if isValid(m.top.lastFocus)
42+
m.top.lastFocus.setFocus(true)
43+
else
44+
m.top.setFocus(true)
45+
end if
3646
end sub
3747

3848
' Set values for displayed values on screen

docs/components_music_PlaylistView.bs.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
m.dscr = m.top.findNode("overview")
2121
m.dscr.ellipsisText = tr("... (Press * to read more)")
2222
createDialogPallete()
23+
24+
' Set initial focus to song list
25+
m.top.lastFocus = m.songList
2326
end sub
2427

2528
sub setupMainNode()
@@ -31,6 +34,13 @@
3134
' Start with transparent backdrop for playlists
3235
' Backdrop updates based on focused item as user navigates
3336
m.global.sceneManager.callFunc("setBackgroundImage", "")
37+
38+
' Restore focus to previously focused element
39+
if isValid(m.top.lastFocus)
40+
m.top.lastFocus.setFocus(true)
41+
else
42+
m.top.setFocus(true)
43+
end if
3444
end sub
3545

3646
' Set values for displayed values on screen

docs/components_tvshows_TVEpisodes.bs.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,19 @@
110110

111111
if m.isFirstRun
112112
m.isFirstRun = false
113+
' Set initial focus to episode row on first run
114+
m.tvEpisodeRow.setFocus(true)
115+
m.top.lastFocus = m.tvEpisodeRow
113116
return
114117
end if
115118

116-
m.tvEpisodeRow.setFocus(true)
119+
' Restore focus to previously focused element
120+
if isValid(m.top.lastFocus)
121+
m.top.lastFocus.setFocus(true)
122+
else
123+
m.tvEpisodeRow.setFocus(true)
124+
end if
125+
117126
m.top.refreshSeasonDetailsData = not m.top.refreshSeasonDetailsData
118127
end sub
119128

0 commit comments

Comments
 (0)