Skip to content
This repository has been 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
merged 1 commit into from
Oct 10, 2017

Conversation

tobrun
Copy link
Member

@tobrun tobrun commented Oct 6, 2017

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
@@ -415,6 +415,10 @@ public boolean onGenericMotionEvent(MotionEvent event) {

@Override
public boolean onHoverEvent(MotionEvent event) {
if (mapZoomButtonController == null) {
Copy link
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
Copy link
Member Author

tobrun commented Oct 10, 2017

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

Copy link
Contributor

@Guardiola31337 Guardiola31337 left a comment

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
20 tasks
@Guardiola31337 Guardiola31337 mentioned this pull request Oct 26, 2017
20 tasks
@tobrun tobrun mentioned this pull request Nov 3, 2017
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