pull/1114/head^2
gedoor 3 years ago
parent b97be069bb
commit c8fee0e12c
  1. 1
      app/build.gradle
  2. 3
      app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt

@ -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) {

Loading…
Cancel
Save