Skip to content

Commit

Permalink
Remove duplicate ViewModel updates (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
danesfeder authored Jan 10, 2018
1 parent fec78bc commit 312dde8
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,18 +349,14 @@ public void startNavigation(NavigationViewOptions options) {
// Initialize the camera (listens to MapboxNavigation)
initCamera();
setupListeners(options);
// Update the view models
locationViewModel.updateShouldSimulateRoute(options.shouldSimulateRoute());
routeViewModel.extractRouteOptions(options);
// Everything is setup, subscribe to the view models
subscribeViewModels();
// Initialized and navigating at this point
isInitialized = true;
} else {
// Only need to update the view models
locationViewModel.updateShouldSimulateRoute(options.shouldSimulateRoute());
routeViewModel.extractRouteOptions(options);
}
// Update the view models
locationViewModel.updateShouldSimulateRoute(options.shouldSimulateRoute());
routeViewModel.extractRouteOptions(options);
}

/**
Expand Down

0 comments on commit 312dde8

Please sign in to comment.