EARHORNMUSIC UPnP · Android TV · Phones · Android Auto · GNU/Linux
Release 0.5.0

SearchScreen.kt

34 lines · 1.1 KB

Changed in: 0.5.0

1package dev.stave.ui.search
2
3import androidx.activity.compose.BackHandler
4import androidx.compose.runtime.Composable
5import dev.stave.ui.components.SystemImeTextDialog
6
7// Maintainer, 2026-10-29: KDoc corrected — it called this page dead code;
8// it is the live Servers → Search page.
9/**
10 * Standalone search screen.
11 *
12 * Live: this is the Servers screen's Search page (its header Search
13 * action navigates to [dev.stave.ui.nav.Destinations.SEARCH]). Browse has
14 * its own inline search and does not come here.
15 *
16 * Renders the custom [SystemImeTextDialog]; the previous BasicTextField
17 * implementation summoned the system IME on Android TV and broke the
18 * app's text-entry consistency.
19 */
20@Composable
21fun SearchScreen(
22 onSubmit: (query: String) -> Unit,
23 onBack: () -> Unit,
24) {
25 BackHandler(onBack = onBack)
26 SystemImeTextDialog(
27 title = "Search",
28 subtitle = "Title, artist, or album — partial matches work.",
29 placeholder = "Start typing…",
30 confirmLabel = "search",
31 onConfirm = onSubmit,
32 onDismiss = onBack,
33 )
34}