pull/84/head
kunfei 5 years ago
parent 6c92f21a26
commit 2435993916
  1. 1
      app/src/main/java/io/legado/app/ui/changecover/ChangeCoverDialog.kt
  2. 2
      app/src/main/java/io/legado/app/ui/changecover/ChangeCoverViewModel.kt
  3. 2
      app/src/main/java/io/legado/app/ui/changesource/ChangeSourceDialog.kt

@ -47,6 +47,7 @@ class ChangeCoverDialog : DialogFragment(), ChangeCoverViewModel.CallBack {
savedInstanceState: Bundle?
): View? {
viewModel = getViewModel(ChangeCoverViewModel::class.java)
viewModel.callBack = this
return inflater.inflate(R.layout.dialog_change_source, container)
}

@ -5,7 +5,7 @@ import io.legado.app.App
import io.legado.app.base.BaseViewModel
class ChangeCoverViewModel(application: Application) : BaseViewModel(application) {
var callBack: CallBack? = null
var name: String = ""
var author: String = ""

@ -55,6 +55,7 @@ class ChangeSourceDialog : DialogFragment(),
savedInstanceState: Bundle?
): View? {
viewModel = getViewModel(ChangeSourceViewModel::class.java)
viewModel.callBack = this
return inflater.inflate(R.layout.dialog_change_source, container)
}
@ -92,7 +93,6 @@ class ChangeSourceDialog : DialogFragment(),
DividerItemDecoration(requireContext(), LinearLayout.VERTICAL)
)
recycler_view.adapter = changeSourceAdapter
viewModel.callBack = this
}
private fun initSearchView() {

Loading…
Cancel
Save