mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 04:46:08 +00:00
fix: disconnect desktop download on session cancel
This commit is contained in:
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)
|
||||
|
||||
Reference in new issue
Block a user