From afea9193a2930e9771d85a44141f7133f203e694 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 2 Jun 2019 20:08:15 +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/base/BaseActivity.kt | 4 +--- app/src/main/java/io/legado/app/ui/about/AboutActivity.kt | 2 +- .../java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/base/BaseActivity.kt b/app/src/main/java/io/legado/app/base/BaseActivity.kt index 8fab7d576..1b5f22bf6 100644 --- a/app/src/main/java/io/legado/app/base/BaseActivity.kt +++ b/app/src/main/java/io/legado/app/base/BaseActivity.kt @@ -27,9 +27,7 @@ abstract class BaseActivity : AppCompatActivity() { onViewModelCreated(viewModel, savedInstanceState) } - open fun onViewModelCreated(viewModel: VM, savedInstanceState: Bundle?) { - - } + abstract fun onViewModelCreated(viewModel: VM, savedInstanceState: Bundle?) override fun onCreateOptionsMenu(menu: Menu?): Boolean { return menu?.let { diff --git a/app/src/main/java/io/legado/app/ui/about/AboutActivity.kt b/app/src/main/java/io/legado/app/ui/about/AboutActivity.kt index 150e8a027..fff5b7433 100644 --- a/app/src/main/java/io/legado/app/ui/about/AboutActivity.kt +++ b/app/src/main/java/io/legado/app/ui/about/AboutActivity.kt @@ -13,7 +13,7 @@ class AboutActivity : BaseActivity() { get() = R.layout.activity_about override fun onViewModelCreated(viewModel: AndroidViewModel, savedInstanceState: Bundle?) { - super.onViewModelCreated(viewModel, savedInstanceState) + } } diff --git a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt index 2c282e458..22d27b639 100644 --- a/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt +++ b/app/src/main/java/io/legado/app/ui/replacerule/ReplaceRuleActivity.kt @@ -32,7 +32,6 @@ class ReplaceRuleActivity : BaseActivity() { private var allEnabled = false override fun onViewModelCreated(viewModel: ReplaceRuleViewModel, savedInstanceState: Bundle?) { - super.onViewModelCreated(viewModel, savedInstanceState) initRecyclerView() initDataObservers() initSwipeToDelete()