From 8a8df59e21a91dae52ac139946fa53c67bc2dcd9 Mon Sep 17 00:00:00 2001 From: 1552980358 <1552980358@qq.com> Date: Wed, 9 Sep 2020 12:10:17 +0800 Subject: [PATCH] BaseService.kt: Modify functions into assigning style Signed-off-by: 1552980358 <1552980358@qq.com> --- app/src/main/java/io/legado/app/base/BaseService.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/base/BaseService.kt b/app/src/main/java/io/legado/app/base/BaseService.kt index 163ac09ec..f00540526 100644 --- a/app/src/main/java/io/legado/app/base/BaseService.kt +++ b/app/src/main/java/io/legado/app/base/BaseService.kt @@ -16,13 +16,9 @@ abstract class BaseService : Service(), CoroutineScope by MainScope() { scope: CoroutineScope = this, context: CoroutineContext = Dispatchers.IO, block: suspend CoroutineScope.() -> T - ): Coroutine { - return Coroutine.async(scope, context) { block() } - } + ) = Coroutine.async(scope, context) { block() } - override fun onBind(intent: Intent?): IBinder? { - return null - } + override fun onBind(intent: Intent?) = null override fun onDestroy() { super.onDestroy()