From 4653ee8a2a2ffcf2033ef0abebd12f0eecc4774b Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 25 Jan 2023 17:58:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/service/DownloadService.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/DownloadService.kt b/app/src/main/java/io/legado/app/service/DownloadService.kt index e5bfe2f58..f3e5aba3b 100644 --- a/app/src/main/java/io/legado/app/service/DownloadService.kt +++ b/app/src/main/java/io/legado/app/service/DownloadService.kt @@ -120,10 +120,8 @@ class DownloadService : BaseService() { if (!completeDownloads.contains(downloadId)) { completeDownloads.add(downloadId) val fileName = downloads[downloadId]?.second - if (fileName?.endsWith(".apk") == true) { + kotlin.runCatching { openDownload(downloadId, fileName) - } else { - toastOnUi("$fileName ${getString(R.string.download_success)}") } } }