|
|
@ -51,7 +51,7 @@ class BookInfoActivity : |
|
|
|
ChangeCoverDialog.CallBack { |
|
|
|
ChangeCoverDialog.CallBack { |
|
|
|
|
|
|
|
|
|
|
|
private val requestCodeChapterList = 568 |
|
|
|
private val requestCodeChapterList = 568 |
|
|
|
private val requestCodeSourceEdit = 562 |
|
|
|
private val requestCodeInfoEdit = 562 |
|
|
|
private val requestCodeRead = 432 |
|
|
|
private val requestCodeRead = 432 |
|
|
|
|
|
|
|
|
|
|
|
override val viewModel: BookInfoViewModel |
|
|
|
override val viewModel: BookInfoViewModel |
|
|
@ -82,7 +82,7 @@ class BookInfoActivity : |
|
|
|
if (viewModel.inBookshelf) { |
|
|
|
if (viewModel.inBookshelf) { |
|
|
|
viewModel.bookData.value?.let { |
|
|
|
viewModel.bookData.value?.let { |
|
|
|
startActivityForResult<BookInfoEditActivity>( |
|
|
|
startActivityForResult<BookInfoEditActivity>( |
|
|
|
requestCodeSourceEdit, |
|
|
|
requestCodeInfoEdit, |
|
|
|
Pair("bookUrl", it.bookUrl) |
|
|
|
Pair("bookUrl", it.bookUrl) |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
@ -368,7 +368,7 @@ class BookInfoActivity : |
|
|
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
|
|
|
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { |
|
|
|
super.onActivityResult(requestCode, resultCode, data) |
|
|
|
super.onActivityResult(requestCode, resultCode, data) |
|
|
|
when (requestCode) { |
|
|
|
when (requestCode) { |
|
|
|
requestCodeSourceEdit -> |
|
|
|
requestCodeInfoEdit -> |
|
|
|
if (resultCode == Activity.RESULT_OK) { |
|
|
|
if (resultCode == Activity.RESULT_OK) { |
|
|
|
viewModel.upEditBook() |
|
|
|
viewModel.upEditBook() |
|
|
|
} |
|
|
|
} |
|
|
|