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

Added null checks in case the user isn't using voice instructions #852

Merged
merged 2 commits into from
Apr 12, 2018

Conversation

devotaaabel
Copy link
Contributor

No description provided.

@@ -27,7 +27,9 @@
public boolean isOccurring(RouteProgress previousRouteProgress, RouteProgress routeProgress) {
if (isNewRoute(routeProgress)) {
clearInstructionList();
voiceInstructionLoader.cacheInstructions(routeProgress, true);
if (voiceInstructionLoader != null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we extract this into a private method? Something like cacheInstructionsFromProgress to remove the duplicate code here?

… the private method, so that in case the VoiceInstructionLoader is initialized late, caching still works
Copy link
Contributor

@danesfeder danesfeder left a comment

Choose a reason for hiding this comment

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

Sweet, thanks for the update @devotaaabel

@devotaaabel devotaaabel merged commit 7a853f5 into master Apr 12, 2018
@Guardiola31337 Guardiola31337 deleted the devota-api-voice-bug branch April 12, 2018 12:54
@devotaaabel
Copy link
Contributor Author

Fixes #834

@danesfeder danesfeder mentioned this pull request May 3, 2018
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defect to be fixed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants