From e6cb74cba3b4f042b7f9f6517884e35e5461e33f Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 6 Aug 2020 08:12:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=9B=BE=E7=89=87=E9=A2=9C?= =?UTF-8?q?=E8=89=B2=E4=B8=BAFULL=E6=97=B6=E7=9A=84=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/service/help/ReadBook.kt | 4 +--- .../java/io/legado/app/ui/book/read/ReadBookActivity.kt | 6 ------ .../main/java/io/legado/app/ui/book/read/page/PageView.kt | 5 +---- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/io/legado/app/service/help/ReadBook.kt b/app/src/main/java/io/legado/app/service/help/ReadBook.kt index 8f5c74f4e..7878cb1c2 100644 --- a/app/src/main/java/io/legado/app/service/help/ReadBook.kt +++ b/app/src/main/java/io/legado/app/service/help/ReadBook.kt @@ -64,7 +64,6 @@ object ReadBook { null } } - callBack?.upPageAnim() } fun upMsg(msg: String?) { @@ -357,7 +356,7 @@ object ReadBook { } } - val imageStyle get() = webBook?.bookSource?.ruleContent?.imageStyle + private val imageStyle get() = webBook?.bookSource?.ruleContent?.imageStyle fun saveRead() { Coroutine.async { @@ -379,6 +378,5 @@ object ReadBook { fun upView() fun pageChanged() fun contentLoadFinish() - fun upPageAnim() } } \ No newline at end of file diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt index 83c4cdf4d..38bd04b42 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookActivity.kt @@ -550,12 +550,6 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_boo } } - override fun upPageAnim() { - launch { - page_view?.upPageAnim() - } - } - /** * 页面改变 */ diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt index 63e90d0fe..efad055aa 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/PageView.kt @@ -17,7 +17,6 @@ import io.legado.app.ui.book.read.page.provider.ChapterProvider import io.legado.app.utils.activity import io.legado.app.utils.screenshot import kotlinx.android.synthetic.main.activity_book_read.view.* -import java.util.* class PageView(context: Context, attrs: AttributeSet) : FrameLayout(context, attrs), @@ -110,9 +109,7 @@ class PageView(context: Context, attrs: AttributeSet) : fun upPageAnim() { pageDelegate?.onDestroy() pageDelegate = null - pageDelegate = if (ReadBook.imageStyle?.toUpperCase(Locale.ROOT) == "FULL") { - ScrollPageDelegate(this) - } else when (ReadBookConfig.pageAnim) { + pageDelegate = when (ReadBookConfig.pageAnim) { 0 -> CoverPageDelegate(this) 1 -> SlidePageDelegate(this) 2 -> SimulationPageDelegate(this)