ChapterNavigator: dispatch page change only when needed
Co-authored-by: p (cherry picked from commit f84d9a08b4af768b1e9920c43cc445c86f5427fc)
This commit is contained in:
parent
80063ffba4
commit
bf6e1abbc7
1 changed files with 4 additions and 1 deletions
|
|
@ -151,7 +151,10 @@ fun ChapterNavigator(
|
|||
valueRange = 1f..totalPages.toFloat(),
|
||||
steps = totalPages - 2,
|
||||
onValueChange = {
|
||||
onSliderValueChange(it.roundToInt() - 1)
|
||||
val new = it.roundToInt() - 1
|
||||
if (new != currentPage) {
|
||||
onSliderValueChange(new)
|
||||
}
|
||||
},
|
||||
interactionSource = interactionSource,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue