@ -133,7 +133,6 @@ dependencies {
implementation "androidx.activity:activity-ktx:1.2.3"
implementation "androidx.fragment:fragment-ktx:1.3.5"
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation "androidx.collection:collection-ktx:1.1.0"
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
@ -419,8 +419,7 @@ object ChapterProvider {
* 超出边界处理
*/
private fun exceed(textLine: TextLine, words: Array<String>) {
if (textLine.textChars.isEmpty()) return
val endX = textLine.textChars.last().end
val endX = textLine.textChars.lastOrNull()?.end ?: return
if (endX > visibleRight) {
val cc = (endX - visibleRight) / words.size
for (i in 0..words.lastIndex) {