feat(ui): option to hide the Agent tab (#2515)

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-11-12 02:10:34 -05:00
1 parent 01bfe8519e
commit da5a36151b
9 files changed
+42 -5

No files matched your search

@@ -125,7 +125,7 @@ internal fun navigationKeys(s: FrontEndState) = buildList {
add("steam"); add("games")
if (s.gameStoresEnabled) add("stores")
add("desktop")
if (com.droiddeck.launcher.agent.AgentHost.available) add("agent")
if (com.droiddeck.launcher.agent.AgentTab.visible) add("agent")
add("components")
if (s.isHomeApp) add("android-apps")
add("setup"); add("updates")
@@ -455,6 +455,11 @@ internal fun SetupPanel(
val railContext = androidx.compose.ui.platform.LocalContext.current
remember { RailLabels.load(railContext) }
ToggleRow(host, "rail-labels", stringResource(R.string.setup_rail_labels), stringResource(R.string.setup_rail_labels_hint), RailLabels.shown) { RailLabels.set(railContext, it) }
if (com.droiddeck.launcher.agent.AgentHost.available) {
ToggleRow(host, "agent-tab", stringResource(R.string.setup_agent_tab), null, com.droiddeck.launcher.agent.AgentTab.shown) {
com.droiddeck.launcher.agent.AgentTab.set(railContext, it)
}
}
LanguageRow(host, s.language, a.onLanguage)
ToggleRow(host, "show-stores", stringResource(R.string.setup_stores), null, s.gameStoresEnabled, onChange = a.onGameStoresEnabled)
}
@@ -14,7 +14,7 @@ internal enum class SessionDrawerPage(val firstControl: String) {
}
internal fun sessionDrawerPages(
hasSecondScreen: Boolean, hasGlasses: Boolean = false, hasAgent: Boolean = com.droiddeck.launcher.agent.AgentHost.installed,
hasSecondScreen: Boolean, hasGlasses: Boolean = false, hasAgent: Boolean = com.droiddeck.launcher.agent.AgentHost.installed && com.droiddeck.launcher.agent.AgentTab.shown,
): List<SessionDrawerPage> =
SessionDrawerPage.entries.filter {
(hasSecondScreen || it != SessionDrawerPage.SECOND_SCREEN) && (hasGlasses || it != SessionDrawerPage.GLASSES) &&