pull/32/head
kunfei 5 years ago
parent af5d7553fe
commit 6811c20259
  1. 8
      app/src/main/java/io/legado/app/ui/chapterlist/BookmarkFragment.kt
  2. 7
      app/src/main/java/io/legado/app/ui/chapterlist/ChapterListActivity.kt
  3. 9
      app/src/main/java/io/legado/app/ui/chapterlist/ChapterListFragment.kt
  4. 8
      app/src/main/java/io/legado/app/ui/chapterlist/ChapterListViewModel.kt

@ -1,8 +1,12 @@
package io.legado.app.ui.chapterlist
import io.legado.app.R
import io.legado.app.base.BaseFragment
import io.legado.app.base.VMBaseFragment
import io.legado.app.utils.getViewModelOfActivity
class BookmarkFragment : VMBaseFragment<ChapterListViewModel>(R.layout.fragment_bookmark) {
override val viewModel: ChapterListViewModel
get() = getViewModelOfActivity(ChapterListViewModel::class.java)
class BookmarkFragment : BaseFragment(R.layout.fragment_bookmark) {
}

@ -8,16 +8,19 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import io.legado.app.R
import io.legado.app.base.BaseActivity
import io.legado.app.base.VMBaseActivity
import io.legado.app.lib.theme.ATH
import io.legado.app.lib.theme.primaryTextColor
import io.legado.app.utils.getViewModel
import io.legado.app.utils.gone
import io.legado.app.utils.visible
import kotlinx.android.synthetic.main.activity_chapter_list.*
import kotlinx.android.synthetic.main.view_tab_layout.*
import kotlinx.android.synthetic.main.view_title_bar.*
class ChapterListActivity : BaseActivity(R.layout.activity_chapter_list) {
class ChapterListActivity : VMBaseActivity<ChapterListViewModel>(R.layout.activity_chapter_list) {
override val viewModel: ChapterListViewModel
get() = getViewModel(ChapterListViewModel::class.java)
private var searchView: SearchView? = null

@ -1,8 +1,13 @@
package io.legado.app.ui.chapterlist
import io.legado.app.R
import io.legado.app.base.BaseFragment
import io.legado.app.base.VMBaseFragment
import io.legado.app.utils.getViewModelOfActivity
class ChapterListFragment : VMBaseFragment<ChapterListViewModel>(R.layout.fragment_chapter_list) {
override val viewModel: ChapterListViewModel
get() = getViewModelOfActivity(ChapterListViewModel::class.java)
class ChapterListFragment : BaseFragment(R.layout.fragment_chapter_list) {
}

@ -0,0 +1,8 @@
package io.legado.app.ui.chapterlist
import io.legado.app.App
import io.legado.app.base.BaseViewModel
class ChapterListViewModel : BaseViewModel(App.INSTANCE) {
}
Loading…
Cancel
Save