SearchScreen.kt
Each line, with the release that last changed it.
| 0.5.0 | 1 | package dev.stave.ui.search |
| 2 | ||
| 3 | import androidx.activity.compose.BackHandler | |
| 4 | import androidx.compose.runtime.Composable | |
| 5 | import 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 | |
| 21 | fun 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 | } |


