Timeout the installation of extensions after 10s

This commit is contained in:
inorichi
2018-02-06 22:11:36 +01:00
parent 636c027298
commit eb8479ac9a
2 changed files with 26 additions and 8 deletions

View File

@@ -105,7 +105,7 @@ open class ExtensionPresenter(
}
private fun Observable<InstallStep>.subscribeToInstallUpdate(extension: Extension) {
this.doOnNext { currentDownloads.put(extension.pkgName, it) }
this.doOnNext { currentDownloads[extension.pkgName] = it }
.doOnUnsubscribe { currentDownloads.remove(extension.pkgName) }
.map { state -> updateInstallStep(extension, state) }
.subscribeWithView({ view, item ->