From e441680da10ecaa328f6b96ee5e7d6f663421dfe Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 13 Oct 2019 19:49:06 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/main/bookshelf/BooksFragment.kt | 8 ++------ .../io/legado/app/ui/main/bookshelf/BooksViewModel.kt | 9 --------- 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 app/src/main/java/io/legado/app/ui/main/bookshelf/BooksViewModel.kt diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksFragment.kt index 47d168562..f867948d1 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksFragment.kt @@ -11,7 +11,7 @@ import androidx.recyclerview.widget.DividerItemDecoration import androidx.recyclerview.widget.LinearLayoutManager import io.legado.app.App import io.legado.app.R -import io.legado.app.base.VMBaseFragment +import io.legado.app.base.BaseFragment import io.legado.app.constant.Bus import io.legado.app.data.entities.Book import io.legado.app.lib.theme.ATH @@ -19,14 +19,13 @@ import io.legado.app.lib.theme.accentColor import io.legado.app.ui.book.info.BookInfoActivity import io.legado.app.ui.book.read.ReadBookActivity import io.legado.app.ui.main.MainViewModel -import io.legado.app.utils.getViewModel import io.legado.app.utils.getViewModelOfActivity import io.legado.app.utils.observeEvent import kotlinx.android.synthetic.main.fragment_books.* import org.jetbrains.anko.startActivity -class BooksFragment : VMBaseFragment(R.layout.fragment_books), +class BooksFragment : BaseFragment(R.layout.fragment_books), BooksAdapter.CallBack { companion object { @@ -39,9 +38,6 @@ class BooksFragment : VMBaseFragment(R.layout.fragment_books), } } - override val viewModel: BooksViewModel - get() = getViewModel(BooksViewModel::class.java) - private lateinit var activityViewModel: MainViewModel private lateinit var booksAdapter: BooksAdapter private var bookshelfLiveData: LiveData>? = null diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksViewModel.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksViewModel.kt deleted file mode 100644 index 19fa12c04..000000000 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/BooksViewModel.kt +++ /dev/null @@ -1,9 +0,0 @@ -package io.legado.app.ui.main.bookshelf - -import android.app.Application -import io.legado.app.base.BaseViewModel - - -class BooksViewModel(application: Application) : BaseViewModel(application) { - -} \ No newline at end of file