From 03b89125ccda04e453364eca97c9c2405f43180a Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 16 Aug 2019 16:58:54 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/constant/Bus.kt | 1 + .../main/java/io/legado/app/ui/readbook/ReadBookActivity.kt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/io/legado/app/constant/Bus.kt b/app/src/main/java/io/legado/app/constant/Bus.kt index 6d7c7b872..12e72949d 100644 --- a/app/src/main/java/io/legado/app/constant/Bus.kt +++ b/app/src/main/java/io/legado/app/constant/Bus.kt @@ -8,4 +8,5 @@ object Bus { const val TTS_RANGE_START = "readAloudNumber" const val BATTERY_CHANGED = "batteryChanged" const val TIME_CHANGED = "timeChanged" + const val READ_ALOUD = "readAloud" } \ No newline at end of file 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 629a0bfeb..f0389a93e 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 @@ -244,5 +244,8 @@ class ReadBookActivity : VMBaseActivity(R.layout.activity_rea observeEvent(Bus.ALOUD_STATE) { readAloudStatus = it } observeEvent(Bus.TTS_START) {} observeEvent(Bus.TTS_RANGE_START) {} + observeEvent(Bus.TIME_CHANGED) {} + observeEvent(Bus.BATTERY_CHANGED) {} + observeEvent(Bus.READ_ALOUD) { onClickReadAloud() } } } \ No newline at end of file