Skip to content

feat: Bump Kotlin to 1.5.30 and KotlinX Coroutines to 1.5.1#162

Merged
arriolac merged 4 commits into
mainfrom
chris/fix/158
Sep 16, 2021
Merged

feat: Bump Kotlin to 1.5.30 and KotlinX Coroutines to 1.5.1#162
arriolac merged 4 commits into
mainfrom
chris/fix/158

Conversation

@arriolac

@arriolac arriolac commented Sep 15, 2021

Copy link
Copy Markdown
Contributor

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
callbackFlow {
setOnMarkerClickListener {
offerCatching(it)
trySend(it).isSuccess

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

codecov Bot commented Sep 16, 2021

Copy link
Copy Markdown

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.

@barbeau barbeau left a comment

Copy link
Copy Markdown
Contributor

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