-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Bump Kotlin to 1.5.30 and KotlinX Coroutines to 1.5.1 #162
Conversation
@@ -390,7 +383,7 @@ public fun GoogleMap.mapLongClickEvents(): Flow<LatLng> = | |||
public fun GoogleMap.markerClickEvents(): Flow<Marker> = | |||
callbackFlow { | |||
setOnMarkerClickListener { | |||
offerCatching(it) | |||
trySend(it).isSuccess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious - why do only some of these use .isSuccess
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because some callback methods return a boolean (like in this case onMarkerClick). offerCatching
returned boolean which was being swallowed in void callback methods. The implementation here of returning isSuccess
should be equivalent to calling offerCatching
.
Looking at this method a bit more though, I think the return value should be customizable by the caller. As it is currently implemented, if the marker is clicked and the channel is able to send the marker object, the default behavior of moving the camera to center on the marker and displaying an info window will always occur. Will file an issue for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue filed here #163
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok - thanks. That's what I initially thought but I was confusing myself by looking at the wrong methods - in this case, setOnMarkerClickListener, which returns void
instead of onMarkerClick, which returns boolean
.
I think the return value should be customizable by the caller.
I agree, that makes sense 👍
Codecov Report
@@ Coverage Diff @@
## main #162 +/- ##
======================================
Coverage ? 0.00%
======================================
Files ? 28
Lines ? 334
Branches ? 6
======================================
Hits ? 0
Misses ? 334
Partials ? 0 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
# [3.2.0](v3.1.0...v3.2.0) (2021-09-16) ### Features * Bump Kotlin to 1.5.30 and KotlinX Coroutines to 1.5.1 ([#162](#162)) ([df90327](df90327))
🎉 This PR is included in version 3.2.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Bump Kotlin and KotlinX Couroutines to 1.5.30 and 1.5.1, respectively.
Fixes #158 🦕