Loading app/src/main/java/foundation/e/apps/manager/workmanager/InstallAppWorker.kt +14 −5 Original line number Diff line number Diff line Loading @@ -136,8 +136,12 @@ class InstallAppWorker @AssistedInject constructor( ) { if (isItUpdateWork) { fusedDownload?.let { val actualFusedDownload = databaseRepository.getDownloadById(it.id) if (actualFusedDownload?.status == Status.INSTALLED) { val packageStatus = packageManagerModule.getPackageStatus( fusedDownload.packageName, fusedDownload.versionCode ) if (packageStatus == Status.INSTALLED) { UpdatesDao.addSuccessfullyUpdatedApp(it) } Loading @@ -152,7 +156,12 @@ class InstallAppWorker @AssistedInject constructor( private suspend fun isUpdateCompleted(): Boolean { val downloadListWithoutAnyIssue = databaseRepository.getDownloadList() .filter { !listOf(Status.INSTALLATION_ISSUE, Status.PURCHASE_NEEDED).contains(it.status) } .filter { !listOf( Status.INSTALLATION_ISSUE, Status.PURCHASE_NEEDED ).contains(it.status) } return UpdatesDao.successfulUpdatedApps.isNotEmpty() && downloadListWithoutAnyIssue.isEmpty() } Loading Loading
app/src/main/java/foundation/e/apps/manager/workmanager/InstallAppWorker.kt +14 −5 Original line number Diff line number Diff line Loading @@ -136,8 +136,12 @@ class InstallAppWorker @AssistedInject constructor( ) { if (isItUpdateWork) { fusedDownload?.let { val actualFusedDownload = databaseRepository.getDownloadById(it.id) if (actualFusedDownload?.status == Status.INSTALLED) { val packageStatus = packageManagerModule.getPackageStatus( fusedDownload.packageName, fusedDownload.versionCode ) if (packageStatus == Status.INSTALLED) { UpdatesDao.addSuccessfullyUpdatedApp(it) } Loading @@ -152,7 +156,12 @@ class InstallAppWorker @AssistedInject constructor( private suspend fun isUpdateCompleted(): Boolean { val downloadListWithoutAnyIssue = databaseRepository.getDownloadList() .filter { !listOf(Status.INSTALLATION_ISSUE, Status.PURCHASE_NEEDED).contains(it.status) } .filter { !listOf( Status.INSTALLATION_ISSUE, Status.PURCHASE_NEEDED ).contains(it.status) } return UpdatesDao.successfulUpdatedApps.isNotEmpty() && downloadListWithoutAnyIssue.isEmpty() } Loading