mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
feat(ui): option to hide the Agent tab (#2515)
This commit is contained in:
1 parent
01bfe8519e
commit
da5a36151b
9 files changed
+42
-5
No files matched your search
@@ -0,0 +1,23 @@
|
||||
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
|
||||
|
||||
object AgentTab {
|
||||
var shown by mutableStateOf(true)
|
||||
private set
|
||||
|
||||
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