Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ void hide() {
}
}

boolean isHidden() {
return isHidden;
}

void updateForegroundOffset(double tilt) {
JsonArray foregroundJsonArray = new JsonArray();
foregroundJsonArray.add(0f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,7 @@ private void updateLocation(final Location location, boolean fromLastLocation) {
return;
}

if (isEnabled && isPluginStarted) {
locationLayer.show();
}
showLocationLayerIfHidden();

if (!fromLastLocation) {
staleStateManager.updateLatestLocationTime();
Expand All @@ -844,6 +842,13 @@ private void updateLocation(final Location location, boolean fromLastLocation) {
lastLocation = location;
}

private void showLocationLayerIfHidden() {
boolean isLocationLayerHidden = locationLayer.isHidden();
if (isEnabled && isPluginStarted && isLocationLayerHidden) {
locationLayer.show();
}
}

private void updateCompassHeading(float heading) {
pluginAnimatorCoordinator.feedNewCompassBearing(heading, mapboxMap.getCameraPosition());
}
Expand Down