From 4b223a10ce0fffa1ccf73fe5ad6e23afc38bf6bb Mon Sep 17 00:00:00 2001 From: xXJSONDeruloXx Date: Thu, 1 Oct 2026 23:47:50 -0400 Subject: [PATCH] ui: the Games page keeps its game while it animates out It was drawn with the current selection, so leaving it for another rail item turned the outgoing page into a copy of the new one for a few frames, which then faded out before the real page rose in: a flash and a dip moving from Games to Steam. --- .../main/java/com/droiddeck/launcher/ui/FrontEndContent.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndContent.kt b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndContent.kt index 13c08ee32..712257f54 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/FrontEndContent.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/FrontEndContent.kt @@ -124,6 +124,10 @@ internal fun Pane( val livePage by rememberUpdatedState(s.pageKey) // Picking another game changes the detail beside the list, not the whole page. val target = if (page != null && s.pageKey != null) s.pageKey else if (selected.startsWith("app:")) "games" else selected + // The game the Games page shows. It must outlive the selection: while the page animates out, + // drawing it with what is selected now (another rail item) turned it into a copy of that page. + val gameShown = remember { arrayOf("games") } + if (selected == "games" || selected.startsWith("app:")) gameShown[0] = selected if (page != null && s.pageKey != null) { pages[s.pageKey] = page if (s.pageKey !in origins) PageOrigin.take()?.let { origins[s.pageKey] = it.translate(-paneAt[0]) } @@ -162,7 +166,7 @@ internal fun Pane( PageFlood(from, leaving = transition.targetState == EnterExitState.PostExit) { shown() } } } - else Content(s, if (key == "games") selected else key, a, Modifier.fillMaxSize(), onSelect, onAndroidAppClick, onOpenDeveloperOptions, onRequestWirelessAdb) + else Content(s, if (key == "games") gameShown[0] else key, a, Modifier.fillMaxSize(), onSelect, onAndroidAppClick, onOpenDeveloperOptions, onRequestWirelessAdb) } } }