ui: hide corrupted message if no installer

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2023-07-07 05:00:22 +02:00
parent 0f77af85d3
commit 434534ac59

View File

@ -383,6 +383,7 @@ object Updater {
context.packageManager.getPackageInfo(context.packageName, PackageManager.PackageInfoFlags.of(PackageManager.GET_PERMISSIONS.toLong()))
}.requestedPermissions.contains(Manifest.permission.REQUEST_INSTALL_PACKAGES)
) {
if (installer(context).isNotEmpty()) {
updaterScope.launch {
val update = try {
checkForUpdates()
@ -391,6 +392,7 @@ object Updater {
}
emitProgress(Progress.Corrupt(update?.fileName))
}
}
return
}