From a0cd5b0cad686e4207d4ff576b811bb689a99d24 Mon Sep 17 00:00:00 2001 From: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com> Date: Sun, 8 Nov 2026 01:47:54 -0500 Subject: [PATCH] fix: retain displayed bitmaps until rendering ends --- .../main/java/com/droiddeck/launcher/ui/InputCommunityPage.kt | 1 - .../main/java/com/droiddeck/launcher/ui/InputLayoutWidgets.kt | 1 - community/controls/README.md | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/ui/InputCommunityPage.kt b/app/src/main/java/com/droiddeck/launcher/ui/InputCommunityPage.kt index 2a887ed55..218bf77a4 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/InputCommunityPage.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/InputCommunityPage.kt @@ -45,7 +45,6 @@ internal fun InputCommunityPage(library: InputLibrary, profile: String, initialR val pageCount = ((filtered.size + 11) / 12).coerceAtLeast(1) val pageEntries = filtered.drop(page * 12).take(12) val previews = remember(selectedSource.id, pageEntries) { mutableStateMapOf() } - DisposableEffect(previews, selectedSource.id, pageEntries) { onDispose { previews.values.forEach { it.recycle() } } } LaunchedEffect(previews, pageEntries) { for (entry in pageEntries) { if (entry.preview == null || entry.key in previews) continue diff --git a/app/src/main/java/com/droiddeck/launcher/ui/InputLayoutWidgets.kt b/app/src/main/java/com/droiddeck/launcher/ui/InputLayoutWidgets.kt index 85d1611a0..d095d2d7d 100644 --- a/app/src/main/java/com/droiddeck/launcher/ui/InputLayoutWidgets.kt +++ b/app/src/main/java/com/droiddeck/launcher/ui/InputLayoutWidgets.kt @@ -39,7 +39,6 @@ internal fun InputLayoutRow(layout: SavedInputLayout, role: InputRole, detail: S internal fun InputLayoutThumbnail(layout: SavedInputLayout, role: InputRole, images: Map = emptyMap(), modifier: Modifier = Modifier.width(112.dp).height(76.dp)) { val bitmaps = remember(images) { images.mapValues { (_, bytes) -> android.graphics.BitmapFactory.decodeByteArray(bytes, 0, bytes.size) } } - DisposableEffect(bitmaps) { onDispose { bitmaps.values.forEach { it?.recycle() } } } key(bitmaps) { AndroidView(factory = { InputLayoutPreviewView(it, bitmaps.filterValues { it != null }.mapValues { it.value!! }) }, modifier = modifier.testTag("layout-preview-${layout.id}"), update = { it.update(layout, role) }) diff --git a/community/controls/README.md b/community/controls/README.md index 0cb688cdb..57b56a83a 100644 --- a/community/controls/README.md +++ b/community/controls/README.md @@ -4,7 +4,7 @@ Controller settings → Community controls browses source catalogs and imports o ## Sources and sharing -The Source selector includes DroidDeck and [bagasromadon/ARMSX2-CustomControllerSkins](https://github.com/bagasromadon/ARMSX2-CustomControllerSkins). **Connect another source** accepts a public GitHub repository URL, a GitHub manifest file link, or a direct HTTPS catalog URL. Repository URLs try `main/catalog.json`, then `main/manifest.json`; use a file URL for another branch or a catalog in a subdirectory. Connected sources persist locally and can be removed. Results are filtered before pagination, with at most 12 entries and their previews loaded per page. Previews are sampled to at most 256 pixels and released when changing page, filters, or source. Native manifests use `controls`; ARMSX2 manifests use `skins`. Relative paths stay within the manifest directory, with spaces encoded when downloading. No account credentials are stored in DroidDeck. +The Source selector includes DroidDeck and [bagasromadon/ARMSX2-CustomControllerSkins](https://github.com/bagasromadon/ARMSX2-CustomControllerSkins). **Connect another source** accepts a public GitHub repository URL, a GitHub manifest file link, or a direct HTTPS catalog URL. Repository URLs try `main/catalog.json`, then `main/manifest.json`; use a file URL for another branch or a catalog in a subdirectory. Connected sources persist locally and can be removed. Results are filtered before pagination, with at most 12 entries and their previews loaded per page. Previews are sampled to at most 256 pixels. Page/filter/source changes discard the old cache; Android reclaims displayed bitmaps after rendering references are released. Native manifests use `controls`; ARMSX2 manifests use `skins`. Relative paths stay within the manifest directory, with spaces encoded when downloading. No account credentials are stored in DroidDeck. **Export this layout and actions** creates a portable DroidDeck pack. **Export skin artwork** creates an ARMSX2-compatible PNG-only ZIP when the selected layout has suitable artwork. Share either ZIP directly, or use **Open source submissions** to visit the selected source's issue page and attach it there. GitHub requires an account. Source owners manage submissions and publication; the app does not automatically publish uploads. For other HTTPS hosts, the button opens the catalog URL; use that host's own upload process. A native controls pack includes layouts and bindings, while an artwork ZIP includes only controller images.