From 19cb9bd1fe60bc8caf8ee4decbde6b5fbde6bc99 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 7 Oct 2019 10:34:39 +0800 Subject: [PATCH] up --- .../java/io/legado/app/ui/rss/read/ReadRssActivity.kt | 8 ++++++-- .../java/io/legado/app/ui/rss/read/ReadRssViewModel.kt | 6 ++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt index eb8fa6451..bece90c6c 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssActivity.kt @@ -2,10 +2,14 @@ package io.legado.app.ui.rss.read import android.os.Bundle import io.legado.app.R -import io.legado.app.base.BaseActivity +import io.legado.app.base.VMBaseActivity +import io.legado.app.utils.getViewModel import kotlinx.android.synthetic.main.activity_rss_read.* -class ReadRssActivity : BaseActivity(R.layout.activity_rss_read) { +class ReadRssActivity : VMBaseActivity(R.layout.activity_rss_read) { + + override val viewModel: ReadRssViewModel + get() = getViewModel(ReadRssViewModel::class.java) override fun onActivityCreated(savedInstanceState: Bundle?) { val description = intent.getStringExtra("description") diff --git a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt index 6d43baf9a..57874ef07 100644 --- a/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/rss/read/ReadRssViewModel.kt @@ -1,2 +1,8 @@ package io.legado.app.ui.rss.read +import android.app.Application +import io.legado.app.base.BaseViewModel + +class ReadRssViewModel(application: Application) : BaseViewModel(application) { + +} \ No newline at end of file