From c58f962805c1880d43fb242a7c21426b8d9278ec Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 4 Dec 2020 11:01:54 +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 --- .../java/io/legado/app/ui/about/ReadRecordActivity.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt b/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt index dc4233464..2ccde21b8 100644 --- a/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt +++ b/app/src/main/java/io/legado/app/ui/about/ReadRecordActivity.kt @@ -31,11 +31,11 @@ class ReadRecordActivity : BaseActivity() { initData() } - private fun initView() { - binding.readRecord.tvBookName.setText(R.string.all_read_time) - adapter = RecordAdapter(this) - binding.recyclerView.adapter = adapter - binding.readRecord.ivRemove.onClick { + private fun initView() = with(binding) { + readRecord.tvBookName.setText(R.string.all_read_time) + adapter = RecordAdapter(this@ReadRecordActivity) + recyclerView.adapter = adapter + readRecord.ivRemove.onClick { alert(R.string.delete, R.string.sure_del) { okButton { App.db.readRecordDao().clear()