Skip to content
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

Merged
merged 4 commits into from
Sep 16, 2021

Conversation

arriolac
Copy link
Contributor

@arriolac arriolac commented Sep 15, 2021

Bump Kotlin and KotlinX Couroutines to 1.5.30 and 1.5.1, respectively.

Fixes #158 🦕

@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 15, 2021
@@ -390,7 +383,7 @@ public fun GoogleMap.mapLongClickEvents(): Flow<LatLng> =
public fun GoogleMap.markerClickEvents(): Flow<Marker> =
callbackFlow {
setOnMarkerClickListener {
offerCatching(it)
trySend(it).isSuccess
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue filed here #163

Copy link
Contributor

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
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@34bedde). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head c4cec3e differs from pull request most recent head 2bec1d3. Consider uploading reports for the commit 2bec1d3 to get more accurate results
Impacted file tree graph

@@          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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34bedde...2bec1d3. Read the comment docs.

Copy link
Contributor

@barbeau barbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@arriolac arriolac merged commit df90327 into main Sep 16, 2021
@arriolac arriolac deleted the chris/fix/158 branch September 16, 2021 19:43
googlemaps-bot pushed a commit that referenced this pull request Sep 16, 2021
# [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))
@googlemaps-bot
Copy link
Contributor

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement. released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Kotlin and KotlinxCouroutine dependencies to 1.5.+
3 participants