mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
ui: preserve rail focus on components
This commit is contained in:
1 parent
2ba872e7f7
commit
2b1ef0d3e6
3 files changed
+15
-9
No files matched your search
@@ -101,6 +101,7 @@ class MainActivity : ComponentActivity() {
|
||||
private var showProtons by mutableStateOf(false)
|
||||
// Components page: FEX / DXVK / VKD3D-Proton per Proton (ComponentsManager).
|
||||
private var showComponents by mutableStateOf(false)
|
||||
private var focusComponentsContent by mutableStateOf(true)
|
||||
private var compSnapshot by mutableStateOf<ComponentsManager.Snapshot?>(null)
|
||||
private var compCatalog by mutableStateOf<List<ComponentsManager.CatalogItem>>(emptyList())
|
||||
private var compCatalogAt by mutableStateOf(0L)
|
||||
@@ -348,7 +349,7 @@ class MainActivity : ComponentActivity() {
|
||||
frameGenLabel = FrameGen.label(this)
|
||||
},
|
||||
onProtons = { openProtons() },
|
||||
onComponents = { openComponents() },
|
||||
onComponents = { focusContent -> openComponents(focusContent) },
|
||||
onPerformance = { refreshCores(); showProtons = false; showComponents = false; showMapping = false; showPerformance = true },
|
||||
onRoms = { showRoms = true },
|
||||
onFiles = { startActivity(Intent(this, com.droiddeck.launcher.files.FileManagerActivity::class.java)) },
|
||||
@@ -669,7 +670,8 @@ class MainActivity : ComponentActivity() {
|
||||
)
|
||||
}
|
||||
|
||||
private fun openComponents() {
|
||||
private fun openComponents(focusContent: Boolean = true) {
|
||||
focusComponentsContent = focusContent
|
||||
settingsMode = null
|
||||
showPerformance = false
|
||||
showProtons = false
|
||||
@@ -755,6 +757,7 @@ class MainActivity : ComponentActivity() {
|
||||
checking = compChecking,
|
||||
busy = compBusy,
|
||||
downloads = compDownloads,
|
||||
requestInitialFocus = focusComponentsContent,
|
||||
onProton = { compProton = it },
|
||||
onComp = { compComp = it },
|
||||
onSwap = { file -> compProton?.let { pid -> componentAction("Swapping") { ComponentsManager.swap(this, pid, file) } } },
|
||||
|
||||
Reference in new issue
Block a user