mirror of
https://github.com/gedoor/legado.git
synced 2024-07-04 23:36:56 +08:00
优化
This commit is contained in:
parent
c53e789762
commit
2f2ba9a751
|
@ -154,8 +154,8 @@ class ScrollPageDelegate(readView: ReadView) : PageDelegate(readView) {
|
|||
*/
|
||||
private fun calcNextPageOffset(): Int {
|
||||
val visibleHeight = ChapterProvider.visibleHeight
|
||||
val book = ReadBook.book!!
|
||||
if (book.isImage) {
|
||||
val book = ReadBook.book
|
||||
if (book == null || book.isImage) {
|
||||
return -visibleHeight
|
||||
}
|
||||
val visiblePage = readView.getCurVisiblePage()
|
||||
|
@ -170,8 +170,8 @@ class ScrollPageDelegate(readView: ReadView) : PageDelegate(readView) {
|
|||
|
||||
private fun calcPrevPageOffset(): Int {
|
||||
val visibleHeight = ChapterProvider.visibleHeight
|
||||
val book = ReadBook.book!!
|
||||
if (book.isImage) {
|
||||
val book = ReadBook.book
|
||||
if (book == null || book.isImage) {
|
||||
return visibleHeight
|
||||
}
|
||||
val visiblePage = readView.getCurVisiblePage()
|
||||
|
|
Loading…
Reference in New Issue
Block a user