浏览代码

Fix issue with center zoom position

inorichi 6 年之前
父节点
当前提交
d79e141fe5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt

@@ -314,7 +314,7 @@ class PagerPageHolder(
                     when (config.imageZoomType) {
                         ZoomType.Left -> setScaleAndCenter(scale, PointF(0f, 0f))
                         ZoomType.Right -> setScaleAndCenter(scale, PointF(sWidth.toFloat(), 0f))
-                        ZoomType.Center -> setScaleAndCenter(scale, center.apply { y = 0f })
+                        ZoomType.Center -> setScaleAndCenter(scale, center.also { it?.y = 0f })
                     }
                     onImageDecoded()
                 }