Methods

(static) applyRouteQuery() → {boolean}

If the route carries a voice query in its context, pre-populate the search box (which triggers the search via the searchAlpha alias) and focus the text entry. Returns true when a query was applied so onScreenShown can skip normal focus.

onScreenShown fires on first open AND on resume, and the router replays the ORIGINAL route (with its query context) on a back-resume (Router.brs reuses view.route) — so applying unconditionally would re-grab focus to the text box every time the user backs out of a result. Guard on the last-applied value: a back-resume carries the same query we already applied (skip), while a genuinely new voice search carries a different query (apply). The box already holds the prior term on a resume, so skipping a repeat is also the right UX.

Returns:
Type: 
boolean

(static) init() → {void}

This screen has TWO loads, and they are measured as two ledger runs rather than one.

Opening search and running a search are separated by the user typing, which is an unbounded wait belonging to the person rather than to the app — measured on .177, the RTA harness alone sits 1.2 s in that gap. One run spanning both would publish a settled dominated by how fast something typed, which is not a property of this screen at all.

So init opens a run that ends when the keyboard is typable (variant open), and every query opens a fresh one that ends when its results are on screen (variant query) — begin's documented restart semantics, a re-load being a new run rather than a continuation. The variants are what let a reader select between them; npm run measure --nav search refuses a median until one is named, and names both.

Returns:
Type: 
void

(static) loadResults() → {void}

Returns:
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.

Returns:
Type: 
void

(static) onKeyEvent(key, press) → {boolean}

Parameters:
NameTypeDescription
keystring
pressboolean
Returns:
Type: 
boolean

(static) onKeyboardFocusChange() → {void}

onKeyboardFocusChange: Fires when focus changes within the keyboard subtree (including entry/exit). Clears stale backdrop when keyboard gains focus, and adjusts alphabet layout when the voice button popup appears (textEditBox focused moves the textbox up to avoid overlap).

Returns:
Type: 
void

(static) onQuickPlayLaunch(msg) → {void}

Forward a non-navigable result to the playback launcher.

Parameters:
NameTypeDescription
msgdynamic
Returns:
Type: 
void

(static) onResultRowsReady() → {void}

The result rows are built and on screen — closes the rows fill.

Reads the VALUE rather than treating the notification as the signal: SearchRow clears the field at the start of every build, so half the callbacks here are the clear rather than the completion.

Deliberately UNGUARDED against arriving late. The mark is delivered by a CHILD, so a keystroke landing between the build and the mark would open the next run before it lands, and this would then resolve a fill that run never declared. resolve already handles that safely on its own — it warns and returns WITHOUT counting, and the next run still declares and closes its own rows — so the only thing a guard here would buy is silence, and the warning is the one signal that would ever tell anyone the race is real. Unobserved on .177 across two keystroke intervals; if screen-load unbalanced ever names rows, that is the race, and the tripwire is worth more than the suppressed edge case.

Returns:
Type: 
void

(static) onScreenHidden() → {void}

Returns:
Type: 
void

(static) onScreenShown() → {void}

Returns:
Type: 
void

(static) onSearchItemFocused() → {void}

onSearchItemFocused: Update backdrop when search result is focused

Returns:
Type: 
void

(static) onSearchItemSelected(msg) → {void}

A search result was selected — navigate to its route (rich node as context). Non-navigable results fall through to playback.

Parameters:
NameTypeDescription
msgdynamic
Returns:
Type: 
void

(static) searchMedias() → {void}

Returns:
Type: 
void