mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
Tabs decide what shows: new defaults and reset, Apps and Dev Harness as tabs, animated Settings search, Library store accounts (#2798)
This commit is contained in:
1 parent
eabcfc7b74
commit
c8b291b9db
28 files changed
+618
-188
No files matched your search
@@ -1,23 +1,9 @@
|
||||
package com.droiddeck.launcher.agent
|
||||
|
||||
import android.content.Context
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.setValue
|
||||
import com.droiddeck.launcher.session.SessionPrefs
|
||||
import com.droiddeck.launcher.ui.NavTabs
|
||||
|
||||
object AgentTab {
|
||||
var shown by mutableStateOf(false)
|
||||
private set
|
||||
val shown: Boolean get() = "agent" !in NavTabs.hidden
|
||||
|
||||
val visible: Boolean get() = shown && AgentHost.available
|
||||
|
||||
fun load(context: Context) {
|
||||
shown = SessionPrefs.agentTab(context)
|
||||
}
|
||||
|
||||
fun set(context: Context, show: Boolean) {
|
||||
shown = show
|
||||
SessionPrefs.setAgentTab(context, show)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user