Skip to content

Commit

Permalink
Fix false error notification
Browse files Browse the repository at this point in the history
  • Loading branch information
Iamlooker committed Dec 10, 2023
1 parent 7e5ef03 commit e2ae9c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class DownloadService : ConnectionService<DownloadService.Binder>() {
isUpdate = isUpdate
)
if (Cache.getReleaseFile(this@DownloadService, release.cacheFileName).exists()) {
runBlocking { publishSuccess(task) }
lifecycleScope.launch { publishSuccess(task) }
return
}
cancelTasks(packageName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,8 @@ internal class KtorDownloader : Downloader {
} catch (e: ValidationException) {
target.delete()
NetworkResponse.Error.Validation(e)
} catch (e: URLParserException) {
NetworkResponse.Error.Unknown(e)
} catch (e: IllegalStateException) {
NetworkResponse.Error.Unknown(e)
} catch (e: IllegalArgumentException) {
} catch (e: Exception) {
e.exceptCancellation()
NetworkResponse.Error.Unknown(e)
}
}
Expand Down

0 comments on commit e2ae9c4

Please sign in to comment.