ui: hide corrupted message if no installer
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
0f77af85d3
commit
434534ac59
@ -383,13 +383,15 @@ object Updater {
|
|||||||
context.packageManager.getPackageInfo(context.packageName, PackageManager.PackageInfoFlags.of(PackageManager.GET_PERMISSIONS.toLong()))
|
context.packageManager.getPackageInfo(context.packageName, PackageManager.PackageInfoFlags.of(PackageManager.GET_PERMISSIONS.toLong()))
|
||||||
}.requestedPermissions.contains(Manifest.permission.REQUEST_INSTALL_PACKAGES)
|
}.requestedPermissions.contains(Manifest.permission.REQUEST_INSTALL_PACKAGES)
|
||||||
) {
|
) {
|
||||||
updaterScope.launch {
|
if (installer(context).isNotEmpty()) {
|
||||||
val update = try {
|
updaterScope.launch {
|
||||||
checkForUpdates()
|
val update = try {
|
||||||
} catch (_: Throwable) {
|
checkForUpdates()
|
||||||
null
|
} catch (_: Throwable) {
|
||||||
|
null
|
||||||
|
}
|
||||||
|
emitProgress(Progress.Corrupt(update?.fileName))
|
||||||
}
|
}
|
||||||
emitProgress(Progress.Corrupt(update?.fileName))
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user