fix(settings): keep gated search destinations discoverable

This commit is contained in:
xXJSONDeruloXx committed 2026-10-04 15:25:48 -04:00
1 parent 6a9c5da0d0
commit 7f1a743733
4 files changed
+14 -19

No files matched your search

@@ -51,7 +51,6 @@ import com.droiddeck.launcher.core.WifiDiscovery
import com.droiddeck.launcher.core.WirelessAdbPairingService
import com.droiddeck.launcher.ui.CoreRow
import com.droiddeck.launcher.ui.PerformancePage
import com.droiddeck.launcher.ui.ModeSettingsPage
import com.droiddeck.launcher.ui.ModeSettings
import com.droiddeck.launcher.ui.ModeSettingsActions
import com.droiddeck.launcher.ui.ConfirmDialog
@@ -77,7 +77,7 @@ import com.droiddeck.launcher.core.PhantomProcessStatus
import com.droiddeck.launcher.session.SessionPrefs
import com.droiddeck.launcher.R
// The Setup page: runtime and device checks, tools, frame generation and launch settings.
// Existing launcher preference owners, grouped into Settings categories.
private enum class CheckState { OK, WARN, BUSY }
@@ -122,16 +122,6 @@ private fun CheckRow(state: CheckState, title: String, detail: String?, divider:
if (divider) Box(Modifier.fillMaxWidth().height(1.dp).background(pal.line))
}
@Composable
internal fun SetupPanel(
s: FrontEndState,
a: FrontEndActions,
onOpenDeveloperOptions: () -> Unit,
onRequestWirelessAdb: (Boolean) -> Unit,
) {
SettingsHub(s, a)
}
/** Settings owned by Setup's existing state/actions, split into hub categories. */
@Composable
internal fun SetupContent(
@@ -178,8 +168,11 @@ private fun GeneralSettings(s: FrontEndState, a: FrontEndActions, host: MenuHost
s.launcherFullscreen) { a.onLauncherFullscreen(it) }
ToggleRow(host, "launcher-animations", stringResource(R.string.setup_animations), null,
s.animationsEnabled, onChange = a.onAnimationsEnabled)
if (s.homeScreenEnabled) SettingsAnchor("default-home") { ActionRow(stringResource(R.string.setup_default_home),
s.defaultHomeLabel ?: stringResource(R.string.setup_choose_home), stringResource(R.string.setup_choose), a.onHomeApp) }
SettingsAnchor("default-home") {
if (s.homeScreenEnabled) ActionRow(stringResource(R.string.setup_default_home),
s.defaultHomeLabel ?: stringResource(R.string.setup_choose_home), stringResource(R.string.setup_choose), a.onHomeApp)
else SettingsRow(stringResource(R.string.setup_default_home), "Enable Home screen above to choose DroidDeck as the default Home app.") {}
}
}
SettingsGroup(stringResource(R.string.setup_linux_apps)) {
ToggleRow(host, "store-enabled", stringResource(R.string.setup_store),
@@ -341,9 +341,10 @@ fun ModeSettingsContent(
onPick = a.onSuspendPolicy,
)
}
if (s.pipSupported) SettingsGroup(stringResource(R.string.pip_title)) {
ToggleRow(host, "pip-auto", stringResource(R.string.pip_auto), null,
s.pipAutoEnter, onChange = a.onPipAutoEnter)
SettingsGroup(stringResource(R.string.pip_title)) {
ToggleRow(host, "pip-auto", stringResource(R.string.pip_auto),
if (s.pipSupported) null else "Picture-in-picture is unavailable on this device.",
s.pipAutoEnter, enabled = s.pipSupported, onChange = a.onPipAutoEnter)
}
if (steam) SettingsGroup(stringResource(R.string.mode_startup)) {
ToggleRow(
@@ -418,7 +419,9 @@ fun ModeSettingsContent(
s.steamDeckMode, onChange = a.onSteamDeckMode,
)
// Deck mode fixes the branch (SessionPrefs.steamChannel); the choice is for Deck mode off.
if (s.steamDeckMode) SettingsRow(stringResource(R.string.mode_branch), stringResource(R.string.mode_branch_deck)) {}
if (s.steamDeckMode) SettingsAnchor("channel") {
SettingsRow(stringResource(R.string.mode_branch), stringResource(R.string.mode_branch_deck)) {}
}
else ChoiceRow(
host, "channel", stringResource(R.string.mode_branch), stringResource(R.string.mode_branch_hint),
listOf("publicbeta" to stringResource(R.string.mode_branch_public), "steamdeck_publicbeta" to stringResource(R.string.mode_branch_deck_beta)), s.steamChannel,
@@ -187,7 +187,7 @@ object SettingsCatalog {
SettingsEntry("runtime", SettingsCategory.SUPPORT, "Linux runtime", "Install, update, or manage the Linux runtime", listOf("runtime install", "container")),
SettingsEntry("logs", SettingsCategory.SUPPORT, "Session logs", "Enable, share, or clear session logs", listOf("diagnostics", "debug logs")),
SettingsEntry("updates", SettingsCategory.SUPPORT, "DroidDeck updates", "View build information and release channel", listOf("version", "build")),
SettingsEntry("phantom-process", SettingsCategory.SUPPORT, "Child-process limit", "Diagnose Android's process limit that can block Steam", listOf("phantom process", "developer options", "adb")),
SettingsEntry("phantom-process", SettingsCategory.SUPPORT, "Child-process limit", "Diagnose Android's process limit that can block Steam", listOf("phantom process", "developer options", "wireless debugging", "adb")),
)
fun search(query: String): List<SettingsEntry> = entries.filter { it.matches(query) }