优化
This commit is contained in:
@@ -229,8 +229,12 @@ abstract class BaseReadBookActivity :
|
|||||||
customView { alertBinding.root }
|
customView { alertBinding.root }
|
||||||
yesButton {
|
yesButton {
|
||||||
alertBinding.run {
|
alertBinding.run {
|
||||||
val start = editStart.text?.toString()?.toInt() ?: 0
|
val start = editStart.text!!.toString().let {
|
||||||
val end = editEnd.text?.toString()?.toInt() ?: book.totalChapterNum
|
if (it.isEmpty()) 0 else it.toInt()
|
||||||
|
}
|
||||||
|
val end = editEnd.text!!.toString().let {
|
||||||
|
if (it.isEmpty()) book.totalChapterNum else it.toInt()
|
||||||
|
}
|
||||||
CacheBook.start(this@BaseReadBookActivity, book, start - 1, end - 1)
|
CacheBook.start(this@BaseReadBookActivity, book, start - 1, end - 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user