|
|
@ -298,7 +298,7 @@ class ChangeBookSourceDialog() : BaseDialogFragment(R.layout.dialog_book_change_ |
|
|
|
waitDialog.setText(R.string.load_toc) |
|
|
|
waitDialog.setText(R.string.load_toc) |
|
|
|
waitDialog.show() |
|
|
|
waitDialog.show() |
|
|
|
val book = searchBook.toBook() |
|
|
|
val book = searchBook.toBook() |
|
|
|
viewModel.getToc(book, { |
|
|
|
val coroutine = viewModel.getToc(book, { |
|
|
|
waitDialog.dismiss() |
|
|
|
waitDialog.dismiss() |
|
|
|
toastOnUi(it) |
|
|
|
toastOnUi(it) |
|
|
|
}) { toc, source -> |
|
|
|
}) { toc, source -> |
|
|
@ -306,6 +306,9 @@ class ChangeBookSourceDialog() : BaseDialogFragment(R.layout.dialog_book_change_ |
|
|
|
callBack?.changeTo(source, book, toc) |
|
|
|
callBack?.changeTo(source, book, toc) |
|
|
|
onSuccess?.invoke() |
|
|
|
onSuccess?.invoke() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
waitDialog.setOnCancelListener { |
|
|
|
|
|
|
|
coroutine.cancel() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|