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

@ -78,17 +78,7 @@ class ChangeSourceDialog : DialogFragment(),
private fun initRecyclerView() {
changeSourceAdapter = ChangeSourceAdapter(requireContext())
changeSourceAdapter.callBack = object : ChangeSourceAdapter.CallBack {
override fun changeTo(searchBook: SearchBook) {
callBack?.changeTo(searchBook.toBook())
dismiss()
}
override fun curBookUrl(): String {
return viewModel.curBookUrl
}
}
changeSourceAdapter.callBack = this
recycler_view.layoutManager = LinearLayoutManager(context)
recycler_view.addItemDecoration(DividerItemDecoration(requireContext(), LinearLayout.VERTICAL))
recycler_view.adapter = changeSourceAdapter
@ -120,6 +110,7 @@ class ChangeSourceDialog : DialogFragment(),
override fun changeTo(searchBook: SearchBook) {
callBack?.changeTo(searchBook.toBook())
dismiss()
}
override fun curBookUrl(): String {

Loading…
Cancel
Save