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()