From 7947855372e3d23099173e8b0d13733ba5f9f475 Mon Sep 17 00:00:00 2001 From: "Jack Boswell (boswelja)" Date: Wed, 21 Apr 2021 22:12:48 +1200 Subject: [PATCH] Pass sendMessage return value through WatchConnectionClient.kt --- .../boswelja/watchconnection/core/WatchConnectionClient.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/kotlin/com/boswelja/watchconnection/core/WatchConnectionClient.kt b/core/src/main/kotlin/com/boswelja/watchconnection/core/WatchConnectionClient.kt index 5f489982..425c1c3e 100644 --- a/core/src/main/kotlin/com/boswelja/watchconnection/core/WatchConnectionClient.kt +++ b/core/src/main/kotlin/com/boswelja/watchconnection/core/WatchConnectionClient.kt @@ -41,10 +41,10 @@ class WatchConnectionClient( * @param to The [Watch] to send the message to. * @param message The message to send. * @param data The data to send with the message, if any. + * @return true if sending the message was successful, false otherwise. */ - suspend fun sendMessage(to: Watch, message: String, data: ByteArray? = null) { - connectionHandlers[to.platform]?.sendMessage(to.platformId, message, data) - } + suspend fun sendMessage(to: Watch, message: String, data: ByteArray? = null) = + connectionHandlers[to.platform]?.sendMessage(to.platformId, message, data) == true /** * Get a flow of capabilities found for a given [Watch].