mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
fix(ui): Desktop's emulators show before the games' scan, and the shell badge goes
This commit is contained in:
1 parent
e27918e51c
commit
13f4cc8cf4
3 files changed
+9
-12
No files matched your search
@@ -1600,7 +1600,10 @@ class MainActivity : ComponentActivity() {
|
||||
val scanGeneration = ++libraryScanGeneration
|
||||
if (shortcutPicker) shortcutLibraryScanning = true
|
||||
Thread({
|
||||
// Steam's own games first, from their manifests alone (quick), beside the added games
|
||||
// The emulators first: they need no walk of the games, and Desktop's dock is made of them.
|
||||
val emus = Library.emulators(this) { id -> DesktopCatalog.installed(this, id) != null }
|
||||
ui.post { if (scanGeneration == libraryScanGeneration) emulatorList = emus }
|
||||
// Steam's own games next, from their manifests alone (quick), beside the added games
|
||||
// already listed: a game Steam installed during the session shows as the session ends,
|
||||
// without waiting for the added games' walk below. Its Windows components' list is
|
||||
// queued then too, on the low-priority worker, so its page is usually ready.
|
||||
@@ -1621,7 +1624,6 @@ class MainActivity : ComponentActivity() {
|
||||
// so a partial list first would shuffle every capsule when the rest arrived.
|
||||
// LibraryCache covers the wait.
|
||||
val games = if (ready) Library.launchableGames(this) else emptyList()
|
||||
val emus = Library.emulators(this) { id -> DesktopCatalog.installed(this, id) != null }
|
||||
val all = games.distinctBy { it.gameId }
|
||||
if (ready) com.droiddeck.launcher.frontend.LibraryCache.save(this, all)
|
||||
// Once per app start: the Steam games' Windows components from Steam's lists.
|
||||
@@ -1636,7 +1638,6 @@ class MainActivity : ComponentActivity() {
|
||||
ui.post {
|
||||
if (scanGeneration == libraryScanGeneration) {
|
||||
steamGames = all
|
||||
emulatorList = emus
|
||||
shortcutLibraryScanning = false
|
||||
handleGameLink(all)
|
||||
}
|
||||
|
||||
@@ -142,14 +142,11 @@ internal fun DesktopPage(s: FrontEndState, a: FrontEndActions, modifier: Modifie
|
||||
},
|
||||
words = {
|
||||
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
|
||||
// The word at the wordmark's size.
|
||||
Text(
|
||||
stringResource(R.string.rail_desktop), fontSize = if (narrow) 30.sp else 42.sp, lineHeight = if (narrow) 34.sp else 46.sp,
|
||||
fontWeight = FontWeight.Black, color = colors.onBackground,
|
||||
)
|
||||
Chip(stringResource(R.string.desktop_shell_kde), ok = true)
|
||||
}
|
||||
// The word at the wordmark's size.
|
||||
Text(
|
||||
stringResource(R.string.rail_desktop), fontSize = if (narrow) 30.sp else 42.sp, lineHeight = if (narrow) 34.sp else 46.sp,
|
||||
fontWeight = FontWeight.Black, color = colors.onBackground,
|
||||
)
|
||||
BusyChip(s)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -2223,7 +2223,6 @@
|
||||
<string name="flathub_remove_note">Its settings and files are kept.</string>
|
||||
<string name="flathub_keep">Keep</string>
|
||||
<!-- Desktop in the Steam tab's shape. -->
|
||||
<string name="desktop_shell_kde">KDE Plasma</string>
|
||||
<string name="desktop_no_apps">Nothing yet. Get an emulator or add an app below.</string>
|
||||
<string name="desktop_get_more">Get more</string>
|
||||
<string name="desktop_size">Size on disk</string>
|
||||
|
||||
Reference in new issue
Block a user