pull/32/head
kunfei 5 years ago
parent b3b4bf656f
commit e47c703d95
  1. 12
      app/src/main/java/io/legado/app/ui/changesource/ChangeSourceDialog.kt

@ -17,7 +17,9 @@ import io.legado.app.utils.getViewModel
import kotlinx.android.synthetic.main.dialog_change_source.*
class ChangeSourceDialog : DialogFragment(), ChangeSourceViewModel.CallBack {
class ChangeSourceDialog : DialogFragment(),
ChangeSourceViewModel.CallBack,
ChangeSourceAdapter.CallBack {
companion object {
const val tag = "changeSourceDialog"
@ -116,6 +118,14 @@ class ChangeSourceDialog : DialogFragment(), ChangeSourceViewModel.CallBack {
})
}
override fun changeTo(searchBook: SearchBook) {
callBack?.changeTo(searchBook.toBook())
}
override fun curBookUrl(): String {
return viewModel.curBookUrl
}
override fun adapter(): ChangeSourceAdapter {
return changeSourceAdapter
}

Loading…
Cancel
Save