From 9a5758634c2953fa05871e5b604700d4b97be241 Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 25 Aug 2019 21:29:46 +0800 Subject: [PATCH] up --- .../java/io/legado/app/receiver/MediaButtonReceiver.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt index ec23e0265..f1cbfb52c 100644 --- a/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt +++ b/app/src/main/java/io/legado/app/receiver/MediaButtonReceiver.kt @@ -45,12 +45,10 @@ class MediaButtonReceiver : BroadcastReceiver() { } private fun readAloud(context: Context) { - ActivityHelp.isExist(ReadBookActivity::class.java).let { - if (!it) { - val intent = Intent(context, ReadBookActivity::class.java) - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - context.startActivity(intent) - } + if (!ActivityHelp.isExist(ReadBookActivity::class.java)) { + val intent = Intent(context, ReadBookActivity::class.java) + intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) + context.startActivity(intent) } postEvent(Bus.READ_ALOUD, true) }