From b029c6f8655bf0f71c09711a2b24afb3910df5e6 Mon Sep 17 00:00:00 2001 From: kunfei Date: Wed, 12 Feb 2020 20:57:29 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/legado/app/ui/download/DownloadAdapter.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/download/DownloadAdapter.kt b/app/src/main/java/io/legado/app/ui/download/DownloadAdapter.kt index 5b3a4cd50..050f9f502 100644 --- a/app/src/main/java/io/legado/app/ui/download/DownloadAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/download/DownloadAdapter.kt @@ -18,7 +18,13 @@ class DownloadAdapter(context: Context) : if (payloads.isEmpty()) { tv_name.text = item.name tv_author.text = context.getString(R.string.author_show, item.getRealAuthor()) - tv_download.setText(R.string.loading) + val cs = cacheChapters[item.bookUrl] + if (cs == null) { + tv_download.setText(R.string.loading) + } else { + tv_download.text = + context.getString(R.string.download_count, cs.size, item.totalChapterNum) + } } else { val cacheSize = cacheChapters[item.bookUrl]?.size ?: 0 tv_download.text =