diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt index 296c86172..fe2363b5c 100644 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt +++ b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksFragment.kt @@ -9,7 +9,7 @@ import androidx.recyclerview.widget.GridLayoutManager 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.BookType import io.legado.app.constant.Bus import io.legado.app.constant.PreferKey @@ -22,19 +22,15 @@ 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.getPrefInt -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 { - override val viewModel: BooksViewModel - get() = getViewModel(BooksViewModel::class.java) - companion object { fun newInstance(position: Int): BooksFragment { return BooksFragment().apply { diff --git a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksViewModel.kt b/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksViewModel.kt deleted file mode 100644 index 6a7a51da3..000000000 --- a/app/src/main/java/io/legado/app/ui/main/bookshelf/books/BooksViewModel.kt +++ /dev/null @@ -1,10 +0,0 @@ -package io.legado.app.ui.main.bookshelf.books - -import android.app.Application -import io.legado.app.base.BaseViewModel - - -class BooksViewModel(application: Application) : BaseViewModel(application) { - - -} \ No newline at end of file