From de643575700c8cc5a609c582ae255f0964ffe642 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 9 Feb 2021 13:29:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B9=A6=E6=BA=90=E5=AF=BC?= =?UTF-8?q?=E5=85=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/association/ImportBookSourceDialog.kt | 4 ++-- .../io/legado/app/ui/association/ImportRssSourceDialog.kt | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt index 2b5c2fea6..c4d55e1a9 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportBookSourceDialog.kt @@ -9,7 +9,7 @@ import android.view.MenuItem import android.view.View import android.view.ViewGroup import androidx.appcompat.widget.Toolbar -import androidx.fragment.app.viewModels +import androidx.fragment.app.activityViewModels import androidx.recyclerview.widget.LinearLayoutManager import io.legado.app.R import io.legado.app.base.BaseDialogFragment @@ -38,7 +38,7 @@ class ImportBookSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickList private val binding by viewBinding(DialogRecyclerViewBinding::bind) - val viewModel: ImportBookSourceViewModel by viewModels() + val viewModel: ImportBookSourceViewModel by activityViewModels() lateinit var adapter: SourcesAdapter override fun onStart() { diff --git a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt index 265d10a18..1942b2752 100644 --- a/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt +++ b/app/src/main/java/io/legado/app/ui/association/ImportRssSourceDialog.kt @@ -36,9 +36,7 @@ import io.legado.app.utils.visible class ImportRssSourceDialog : BaseDialogFragment(), Toolbar.OnMenuItemClickListener { private val binding by viewBinding(DialogRecyclerViewBinding::bind) - - val viewModel: ImportRssSourceViewModel - by activityViewModels() + val viewModel: ImportRssSourceViewModel by activityViewModels() lateinit var adapter: SourcesAdapter override fun onStart() {