Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Commit

Permalink
Pass sendMessage return value through WatchConnectionClient.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
boswelja committed Apr 21, 2021
1 parent 980be8f commit 7947855
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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].
Expand Down

0 comments on commit 7947855

Please sign in to comment.