|
|
@ -45,7 +45,7 @@ abstract class PageDelegate(protected val pageView: PageView) { |
|
|
|
protected var atTop: Boolean = false |
|
|
|
protected var atTop: Boolean = false |
|
|
|
protected var atBottom: Boolean = false |
|
|
|
protected var atBottom: Boolean = false |
|
|
|
|
|
|
|
|
|
|
|
private var snackbar: Snackbar? = null |
|
|
|
private var snackBar: Snackbar? = null |
|
|
|
|
|
|
|
|
|
|
|
private val scroller: Scroller by lazy { |
|
|
|
private val scroller: Scroller by lazy { |
|
|
|
Scroller( |
|
|
|
Scroller( |
|
|
@ -291,10 +291,10 @@ abstract class PageDelegate(protected val pageView: PageView) { |
|
|
|
direction = Direction.PREV |
|
|
|
direction = Direction.PREV |
|
|
|
val hasPrev = pageView.pageFactory?.hasPrev() == true |
|
|
|
val hasPrev = pageView.pageFactory?.hasPrev() == true |
|
|
|
if (!hasPrev) { |
|
|
|
if (!hasPrev) { |
|
|
|
snackbar ?: let { |
|
|
|
snackBar ?: let { |
|
|
|
snackbar = pageView.snackbar("没有上一页") |
|
|
|
snackBar = pageView.snackbar("没有上一页") |
|
|
|
} |
|
|
|
} |
|
|
|
snackbar?.let { |
|
|
|
snackBar?.let { |
|
|
|
if (!it.isShown) { |
|
|
|
if (!it.isShown) { |
|
|
|
it.setText("没有上一页") |
|
|
|
it.setText("没有上一页") |
|
|
|
it.show() |
|
|
|
it.show() |
|
|
@ -309,10 +309,10 @@ abstract class PageDelegate(protected val pageView: PageView) { |
|
|
|
direction = Direction.NEXT |
|
|
|
direction = Direction.NEXT |
|
|
|
val hasNext = pageView.pageFactory?.hasNext() == true |
|
|
|
val hasNext = pageView.pageFactory?.hasNext() == true |
|
|
|
if (!hasNext) { |
|
|
|
if (!hasNext) { |
|
|
|
snackbar ?: let { |
|
|
|
snackBar ?: let { |
|
|
|
snackbar = pageView.snackbar("没有下一页") |
|
|
|
snackBar = pageView.snackbar("没有下一页") |
|
|
|
} |
|
|
|
} |
|
|
|
snackbar?.let { |
|
|
|
snackBar?.let { |
|
|
|
if (!it.isShown) { |
|
|
|
if (!it.isShown) { |
|
|
|
it.setText("没有下一页") |
|
|
|
it.setText("没有下一页") |
|
|
|
it.show() |
|
|
|
it.show() |
|
|
|