mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-24 03:42:15 +00:00
Fix: Showing install action while download is running (closes #251)
This commit is contained in:
parent
193286b894
commit
c990114b57
@ -54,7 +54,8 @@ class AppViewModelX(val db: DatabaseX, val packageName: String) : ViewModel() {
|
|||||||
val product = findSuggestedProduct(productRepos, installed) { it.first }?.first
|
val product = findSuggestedProduct(productRepos, installed) { it.first }?.first
|
||||||
val compatible = product != null && product.selectedReleases.firstOrNull()
|
val compatible = product != null && product.selectedReleases.firstOrNull()
|
||||||
.let { it != null && it.incompatibilities.isEmpty() }
|
.let { it != null && it.incompatibilities.isEmpty() }
|
||||||
val canInstall = product != null && installed == null && compatible
|
val canInstall =
|
||||||
|
product != null && installed == null && compatible && downloadState.value == null
|
||||||
val canUpdate =
|
val canUpdate =
|
||||||
product != null && compatible && product.canUpdate(installed) &&
|
product != null && compatible && product.canUpdate(installed) &&
|
||||||
!shouldIgnore(product.versionCode)
|
!shouldIgnore(product.versionCode)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user