Methods
(static) buildOptionsMenu() → {void}
Build the options side-panel (search / settings / change user / change server / sign out). The buttons are observed by Home itself; onSidePanelOption routes them — navigation actions go through the router, session actions up to main.bs.
- Source
- Type:
- void
(static) destroyActiveContent() → {void}
Destroys the currently active tab content and removes it from the scene
- Source
- Type:
- void
(static) getActiveRows() → {object}
Returns the currently active row list
- Source
- Type:
- object
(static) handleFocus(_dataopt) → {boolean}
Router focus hook (overrides JRScreen.handleFocus). The router asks the resuming view to take focus right after onViewResume -> onScreenShown. The base implementation uses restoreFocus(m.top), which focuses a Home row and clobbers the overhang-icon (gear/search) focus onScreenShown just set. Re-run Home's overhang-aware restore so the gear stays focused on return (matching prod), then consume the one-shot overhang target.
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
_data | object | <optional> | {} |
- Source
- Type:
- boolean
(static) handleHomeMenuAction(actionId) → {void}
Route a Home menu action. Navigation actions resolve through the router on the render thread; session-ending actions (change user/server, sign out) are emitted as userMenuAction for main.bs (which owns the LoginFlow re-entry via goto appStart).
| Name | Type | Description |
|---|---|---|
actionId | string |
- Source
- Type:
- void
(static) init() → {void}
- Source
- Type:
- void
(static) initVoiceBox() → {void}
initVoiceBox: One-time voice setup in init() — matches BaseGridView's pattern. Sets voiceEnabled=true ONCE and never sets it back to false. The firmware silently manages voiceEnabled when other screens claim voice routing. Only active is toggled on screen show/hide.
- Source
- Type:
- void
(static) loadLibraries() → {void}
Kicks off the home-row library load. Called from onScreenShown on first run (the router mounts Home, so this is no longer triggered externally by main.bs).
- Source
- Type:
- void
(static) onCloseSidePanel() → {void}
Options side-panel closed without a selection — restore focus to content.
- Source
- Type:
- void
(static) onDestroy() → {void}
onDestroy: Full teardown releasing all resources before component removal Called automatically via JRScreen.beforeViewClose when sgRouter permanently closes this view.
- Source
- Type:
- void
(static) onIconFocusReturn(msg) → {void}
Overhang icon signals DOWN was pressed — return focus to active content
| Name | Type | Description |
|---|---|---|
msg | object |
- Source
- Type:
- void
(static) onKeyEvent(key, press) → {boolean}
| Name | Type | Description |
|---|---|---|
key | string | |
press | boolean |
- Source
- Type:
- boolean
(static) onOverhangIconAction() → {void}
Overhang icon (search/settings) was pressed — proxy to Home's interface for Main.bs. Saves the focused icon for focus restoration on return, then moves focus to Home group BEFORE firing the action. This ensures the router's suspend saves a focus inside Home's tree. We focus m.top (not activeContent) to avoid a visible focus jump to the row list before the screen transition.
- Source
- Type:
- void
(static) onQuickPlayLaunch(msg) → {void}
Forward a fallen-through item tap to the playback launcher.
| Name | Type | Description |
|---|---|---|
msg | dynamic |
- Source
- Type:
- void
(static) onQuickPlayNode(msg) → {void}
Proxy quickPlayNode from whichever row list fires it. Must pass through invalid clears so Home.quickPlayNode doesn't retain a stale value that re-fires the m.port observer on screen restoration.
| Name | Type | Description |
|---|---|---|
msg | dynamic |
- Source
- Type:
- void
(static) onRowItemSelected(msg) → {void}
A row item was selected — navigate to its route, passing the rich content node as context (so details/library self-load without a re-fetch). Items that aren't view navigation (e.g. Chapter) fall through to the playback path via quickPlayNode.
| Name | Type | Description |
|---|---|---|
msg | dynamic |
- Source
- Type:
- void
(static) onScreenHidden() → {void}
JRScreen hook called when the screen is hidden by the screen manager
- Source
- Type:
- void
(static) onScreenShown() → {void}
JRScreen hook called when the screen is displayed by the screen manager
- Source
- Type:
- void
(static) onSidePanelOption(msg) → {void}
Options side-panel button pressed — close the panel, then route the action.
| Name | Type | Description |
|---|---|---|
msg | dynamic |
- Source
- Type:
- void
(static) onTabBarFocusReturn() → {void}
Tab bar signals DOWN was pressed — return focus to active content
- Source
- Type:
- void
(static) onTabChanged() → {void}
Called when selectedTabId changes (proxied back from the overhang tab bar by JRScene's overhang controller). Destroys the old tab's content and creates the new tab's content.
- Source
- Type:
- void
(static) onUserDropdownFocusReturn() → {void}
User dropdown signals DOWN was pressed — return focus to active content
- Source
- Type:
- void
(static) onUserMenuAction() → {void}
User dropdown menu item was selected — proxy to Home's interface for Main.bs. Saves the dropdown so onScreenShown can restore focus when the user returns, then moves focus into Home's tree so the router's suspend saves a focus that back-from-route can restore.
- Source
- Type:
- void
(static) onVoiceSearch() → {void}
onVoiceSearch: Fires when voice input is captured by the hidden VoiceTextEditBox. Signals Main.bs to open SearchResults with the spoken query pre-populated.
- Source
- Type:
- void
(static) refresh() → {void}
- Source
- Type:
- void
(static) restoreHomeFocus() → {void}
Restore Home's focus, OVERHANG-ICON-AWARE. Priority:
- The overhang element that triggered the last navigation (gear / search / dropdown). These live in the persistent overhang — a child of JRScene, NOT of Home — so they can't be reached via m.top.lastFocus.
- Home's own lastFocus (normal in-group restoration), skipping the hidden voice box.
- Active content, then the Home group. Called by BOTH onScreenShown and handleFocus: the router invokes handleFocus right after onScreenShown, and its base restoreFocus(m.top) would otherwise override the overhang-icon focus with a Home row (the "gear focus removed on return to Home" regression). Does NOT clear the one-shot m.lastOverhangFocus — handleFocus clears it once the resume's focus restore is complete.
- Source
- Type:
- void