🛠️ Coerce progress in Reader
* Coerce progress in 0f to 1f (preventing percentage like 135%)
This commit is contained in:
parent
896e584e6d
commit
0a3adf42f0
1 changed files with 2 additions and 2 deletions
|
|
@ -649,8 +649,8 @@ class ReaderViewModel @Inject constructor(
|
||||||
return 1f
|
return 1f
|
||||||
}
|
}
|
||||||
|
|
||||||
return@run (firstVisibleItemIndex ?: listState.firstVisibleItemIndex) /
|
return@run ((firstVisibleItemIndex ?: listState.firstVisibleItemIndex) /
|
||||||
(text.lastIndex).toFloat()
|
(text.lastIndex).toFloat()).coerceIn(0f, 1f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue