pull/1352/head
gedoor 3 years ago
parent d0b7bb0c0b
commit 813f45dc05
  1. 5
      app/src/main/java/io/legado/app/service/DownloadService.kt

@ -115,10 +115,11 @@ class DownloadService : BaseService() {
private fun successDownload(downloadId: Long) { private fun successDownload(downloadId: Long) {
if (!completeDownloads.contains(downloadId)) { if (!completeDownloads.contains(downloadId)) {
completeDownloads.add(downloadId) completeDownloads.add(downloadId)
if (downloads[downloadId]?.second?.endsWith(".apk") == true) { val fileName = downloads[downloadId]?.second
if (fileName?.endsWith(".apk") == true) {
installApk(downloadId) installApk(downloadId)
} else { } else {
toastOnUi("${downloads[downloadId]?.second} ${getString(R.string.download_success)}") toastOnUi("$fileName ${getString(R.string.download_success)}")
} }
} }
} }

Loading…
Cancel
Save