From af90d2e3c4d52edb1d37a30e90ee20437c8f74e3 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 25 Aug 2019 13:09:30 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/readbook/ReadBookActivity.kt | 9 --------- .../main/java/io/legado/app/ui/readbook/ReadMenu.kt | 13 +++++-------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt index 9c4c7c505..db6810886 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadBookActivity.kt @@ -22,7 +22,6 @@ import io.legado.app.service.ReadAloudService import io.legado.app.ui.changesource.ChangeSourceDialog import io.legado.app.ui.chapterlist.ChapterListActivity import io.legado.app.ui.readbook.config.MoreConfigDialog -import io.legado.app.ui.readbook.config.ReadAloudDialog import io.legado.app.ui.readbook.config.ReadStyleDialog import io.legado.app.ui.replacerule.ReplaceRuleActivity import io.legado.app.ui.sourceedit.SourceEditActivity @@ -143,14 +142,6 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_rea MoreConfigDialog().show(supportFragmentManager, "moreConfig") } - override fun showReadAloud(): Boolean { - if (readAloudStatus == Status.STOP) { - return false - } - ReadAloudDialog().show(supportFragmentManager, "readAloud") - return true - } - override fun menuShow() { Help.upSystemUiVisibility(window, !read_menu.isVisible) } diff --git a/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt b/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt index 4b09ceb25..81bdb2616 100644 --- a/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt +++ b/app/src/main/java/io/legado/app/ui/readbook/ReadMenu.kt @@ -67,13 +67,11 @@ class ReadMenu : FrameLayout { } fun runMenuIn() { - if (callback?.showReadAloud() != true) { - this.visible() - title_bar.visible() - bottom_menu.visible() - title_bar.startAnimation(menuTopIn) - bottom_menu.startAnimation(menuBottomIn) - } + this.visible() + title_bar.visible() + bottom_menu.visible() + title_bar.startAnimation(menuTopIn) + bottom_menu.startAnimation(menuBottomIn) } fun runMenuOut(onMenuOutEnd: (() -> Unit)? = null) { @@ -241,7 +239,6 @@ class ReadMenu : FrameLayout { fun openChapterList() fun showReadStyle() fun showMoreSetting() - fun showReadAloud(): Boolean fun menuShow() fun menuHide() }