fix: disconnect desktop download on session cancel

This commit is contained in:
xXJsonDeruloXx committed 2026-10-22 09:56:05 -04:00
1 parent 4e4a731221
commit c02832ac59
6 files changed
+84 -7

No files matched your search

@@ -86,7 +86,10 @@ object DesktopCatalog {
install(context, entry, { false }, listener)
/** A cancel stops the download and is checked once more before anything on disk changes; extraction itself runs to the end. */
fun install(context: Context, entry: Entry, cancelled: () -> Boolean, listener: LinuxRuntimeInstaller.ProgressListener?): String? {
fun install(context: Context, entry: Entry, cancelled: () -> Boolean, listener: LinuxRuntimeInstaller.ProgressListener?): String? =
install(context, entry, Downloader.Cancellation(cancelled), listener)
fun install(context: Context, entry: Entry, cancelled: Downloader.Cancellation, listener: LinuxRuntimeInstaller.ProgressListener?): String? {
val root = LinuxRuntime.rootDir(context)
if (!root.isDirectory) return context.getString(R.string.deskpkg_runtime_missing)
if (entry.sha256.isEmpty()) return context.getString(R.string.deskpkg_no_checksum, entry.name)