From e47c703d9530585ccca0ba65691483e8f0615da7 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 19 Aug 2019 14:17:24 +0800 Subject: [PATCH] up --- .../legado/app/ui/changesource/ChangeSourceDialog.kt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceDialog.kt b/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceDialog.kt index b5d0e565a..0fcd83683 100644 --- a/app/src/main/java/io/legado/app/ui/changesource/ChangeSourceDialog.kt +++ b/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 }