fix dialog issue

This commit is contained in:
Ax333l 2024-12-22 22:18:12 +01:00
parent 1231bc106c
commit c4ef7d3b07
No known key found for this signature in database
GPG Key ID: D2B4D85271127D23

View File

@ -105,7 +105,9 @@ class PatcherViewModel(
var isInstalling by mutableStateOf(ongoingPmSession)
private set
private var currentActivityRequest: Pair<CompletableDeferred<Boolean>, String>? by mutableStateOf(null)
private var currentActivityRequest: Pair<CompletableDeferred<Boolean>, String>? by mutableStateOf(
null
)
val activityPromptDialog by derivedStateOf { currentActivityRequest?.second }
private var launchedActivity: CompletableDeferred<ActivityResult>? = null
@ -268,9 +270,7 @@ class PatcherViewModel(
input.selectedPatches
)
}
}
packageInstallerStatus = pmStatus
} else packageInstallerStatus = pmStatus
isInstalling = false
}
@ -284,9 +284,8 @@ class PatcherViewModel(
intent.getStringExtra(UninstallService.EXTRA_UNINSTALL_STATUS_MESSAGE)
?.let(logger::trace)
if (pmStatus != PackageInstaller.STATUS_SUCCESS) {
if (pmStatus != PackageInstaller.STATUS_SUCCESS)
packageInstallerStatus = pmStatus
}
}
}
}