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

fix: Load correct nearby location on launch #128

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Conversation

EmmaSimon
Copy link
Contributor

Summary

Ticket: Fix: Nearby transit stuck on Park St after opening app

When the app was started with location permissions already granted, nearby transit was instead loading the default camera location, rather that the phone's current GPS location. The NearbyTransitLocationProvider was implemented in a silly way where it was effectively immutable, and on app startup, currentLocation and viewportProvider.viewport were both changing and running their onChange at the same time, so the current location was getting overridden by the default camera state.

Testing

Updated tests to handle the changes

When the app was started with location permissions already granted,
nearby transit was instead loading the default camera location, rather
that the phone's current GPS location. The NearbyTransitLocationProvider
was implemented in a silly way where it was effectively static, and on
app startup, `currentLocation` and `viewportProvider.viewport` were both
changing and running their `onChange` at the same time, so the current
location was getting overridden by the default camera state.
@EmmaSimon EmmaSimon requested a review from a team as a code owner April 11, 2024 21:01
@EmmaSimon EmmaSimon requested a review from boringcactus April 11, 2024 21:01
@EmmaSimon EmmaSimon merged commit 33976a4 into main Apr 11, 2024
5 checks passed
@EmmaSimon EmmaSimon deleted the es-fix-nearby-on-launch branch April 11, 2024 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants