From 6edfd8f7a34b4deb43e94ca45009dd2555e54712 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 14 Nov 2019 13:43:00 +0800 Subject: [PATCH] up --- .../app/ui/widget/page/curl/CurlRenderer.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/page/curl/CurlRenderer.kt b/app/src/main/java/io/legado/app/ui/widget/page/curl/CurlRenderer.kt index d2125b1f3..041b2795b 100644 --- a/app/src/main/java/io/legado/app/ui/widget/page/curl/CurlRenderer.kt +++ b/app/src/main/java/io/legado/app/ui/widget/page/curl/CurlRenderer.kt @@ -82,7 +82,7 @@ class CurlRenderer(private val mObserver: Observer) : GLSurfaceView.Renderer { mViewRect.bottom = -1.0f mViewRect.left = -ratio mViewRect.right = ratio - updatePageRects() + updatePageRect() gl.glMatrixMode(GL10.GL_PROJECTION) gl.glLoadIdentity() @@ -121,13 +121,13 @@ class CurlRenderer(private val mObserver: Observer) : GLSurfaceView.Renderer { * SHOW_TWO_PAGES. */ @Synchronized - fun setViewMode(viewmode: Int) { - if (viewmode == SHOW_ONE_PAGE) { - mViewMode = viewmode - updatePageRects() - } else if (viewmode == SHOW_TWO_PAGES) { - mViewMode = viewmode - updatePageRects() + fun setViewMode(viewMode: Int) { + if (viewMode == SHOW_ONE_PAGE) { + mViewMode = viewMode + updatePageRect() + } else if (viewMode == SHOW_TWO_PAGES) { + mViewMode = viewMode + updatePageRect() } } @@ -142,7 +142,7 @@ class CurlRenderer(private val mObserver: Observer) : GLSurfaceView.Renderer { /** * Recalculates page rectangles. */ - private fun updatePageRects() { + private fun updatePageRect() { if (mViewRect.width() == 0f || mViewRect.height() == 0f) { return } else if (mViewMode == SHOW_ONE_PAGE) {