feat: warn before installing a Decky plugin ZIP (#1263)

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-21 12:47:10 -04:00
1 parent bd76b39b84
commit 5d8fd3f5f0
5 files changed
+59

No files matched your search

@@ -17,6 +17,7 @@ internal class DeckyMenu(private val activity: android.app.Activity, private val
var deckyPercent by mutableIntStateOf(-1)
var deckyDownloadingBinary by mutableStateOf(false)
var deckySupervisor by mutableStateOf(false)
var deckyPendingZip by mutableStateOf<File?>(null)
var deckyReleaseRequest = 0
fun refreshDecky() {
@@ -49,6 +50,17 @@ internal class DeckyMenu(private val activity: android.app.Activity, private val
}
fun importPluginZip(archive: File) {
if (deckyStage != null || SessionState.running || deckyInstalled == null) return
deckyPendingZip = archive
}
fun cancelPluginZip() {
deckyPendingZip = null
}
fun confirmPluginZip() {
val archive = deckyPendingZip ?: return
deckyPendingZip = null
if (deckyStage != null || SessionState.running || deckyInstalled == null) return
deckyStage = activity.getString(R.string.decky_plugin_starting); deckyPercent = -1
Thread({