Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Hold off handling hover events untill map has been created - #10142

Merged
tobrun merged 1 commit into
release-aguafrom
tvn-chromebook-fix
Oct 10, 2017
Merged

tobrun merged 1 commit into
release-aguafrom
tvn-chromebook-fix

Conversation

@tobrun

@tobrun tobrun commented Oct 6, 2017

Copy link
Copy Markdown
Member

Noticed that on a Chromebook, there are situations the mouse is hovering while the map isn't created yet.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Oct 6, 2017
@tobrun tobrun added this to the android-v5.2.0 milestone Oct 6, 2017
@tobrun tobrun self-assigned this Oct 6, 2017

@Override
public boolean onHoverEvent(MotionEvent event) {
if (mapZoomButtonController == null) {

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.

What about extracting this block of code into a private method? IMO, we should try to keep public methods as clean as possible so it reads like pseudocode (a.k.a. no conditionals, fors, etc.).

@tobrun
tobrun force-pushed the tvn-chromebook-fix branch from 72dc434 to 7722cdf Compare October 10, 2017 10:06
@tobrun

tobrun commented Oct 10, 2017

Copy link
Copy Markdown
Member Author

@Guardiola31337 I revised the code with your remarks also persisted this change to other parts in the MapView.java. Can you re-review?

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

:shipit:

@tobrun
tobrun merged commit ff03a75 into release-agua Oct 10, 2017
@tobrun
tobrun deleted the tvn-chromebook-fix branch October 10, 2017 13:28
@Guardiola31337 Guardiola31337 mentioned this pull request Oct 19, 2017
16 of 20 tasks
@Guardiola31337 Guardiola31337 mentioned this pull request Oct 26, 2017
15 of 20 tasks
@tobrun tobrun mentioned this pull request Nov 3, 2017
17 of 21 tasks
This was referenced Nov 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Android Mapbox Maps SDK for Android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants