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

Async-update feature branch merge #3468

Merged
merged 4 commits into from
Oct 12, 2021
Merged

Async-update feature branch merge #3468

merged 4 commits into from
Oct 12, 2021

Conversation

S2Ler
Copy link
Contributor

@S2Ler S2Ler commented Oct 12, 2021

@S2Ler S2Ler added this to the v2.0 milestone Oct 12, 2021
@S2Ler S2Ler requested a review from a team October 12, 2021 10:11
@S2Ler S2Ler self-assigned this Oct 12, 2021
S2Ler added 4 commits October 12, 2021 13:12
`onTick` allows to get each replayed location with its index

`onReplayLoopCompleted` allows to stop replay after all locations
replayed.

Prevent crashes if incoming locations array is empty.
- `NavigationService.updateRoute`, `RouteController.updateRoute` is no
longer synchronous. This change is needed because NavNative
implementation is asynchronous, and we need to know when this operation
completes so that we can update local properties with a new route.
Otherwise, we can end up in a situation when the SDK state doesn't match
with the nav status callback received from NavNative.

- `userIsOnRoute(_:status:)` incorrectly assumes that the invalid route
state is an off-route event. The invalid route state is reported when
there is no route set in a native navigator, that happens during passive
navigation.

- It is no longer possible to set `RouteController.routeProgress`
property synchronously for the same reason as why
`RouteController.updateRoute` is asynchronous.

- `updateNavigator` incorrectly referenced old `routeProgress` in the
parameters to NavNative's `setRoute` method.

- `RouteProgress.legIndexHandler` removed as it is no longer needed.
`RouteProgress.legIndex` should be updated only after NavNative status
callback, otherwise they will be out-of-sync.
`RouteController.advanceLegIndex` is the correct method to change
legIndex, then it will be updated in `RouteProgress`.

- `NavigationEventsManagerTestDoubles.flush` method was adjusted to
work closer to real world. Without clearing enqueuedEvents, if flus is
called two times, flushed events will contain two duplicates.

- A lot of `RouteController` dependent tests are fixed, some restored.
@S2Ler S2Ler force-pushed the feature/async-updates branch from 68000ce to c88a42f Compare October 12, 2021 10:13
Copy link
Contributor

@bamx23 bamx23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it was already reviewed, no review from my side, just approve

@S2Ler S2Ler merged commit 4a2c690 into main Oct 12, 2021
@S2Ler S2Ler deleted the feature/async-updates branch October 12, 2021 10:55
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