Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
turn off early route completion
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaxu committed Aug 4, 2020
1 parent 6bdf81a commit 480e904
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class OnRouteViewModel implements LocationServiceSubscriber, MusicPlayerS
// MARK: - Private members

// DEBUG ONLY
private static final boolean IS_DEBUG = false;
private static final int NUM_DEBUG_CHECKPOINTS = 5;
private int debugCheckpointIndex;

Expand Down Expand Up @@ -232,10 +233,10 @@ private void updateDistanceToCheckpoint() {

// Checkpoint is counted if and only if user is within the tolerance radius;
// this is calculated dynamically as the location updates, which may be larger than what is drawn
if (BuildConfig.DEBUG || distanceFromCheckpoint <= toleranceRadius) {
if (IS_DEBUG || distanceFromCheckpoint <= toleranceRadius) {
model.advanceCheckpoint();

if (model.hasCompletedAllCheckpoints() || (BuildConfig.DEBUG && debugCheckpointIndex > NUM_DEBUG_CHECKPOINTS)) {
if (model.hasCompletedAllCheckpoints() || (IS_DEBUG && debugCheckpointIndex > NUM_DEBUG_CHECKPOINTS)) {
isRouteCompleted = true;
onRouteCompleted();
}
Expand Down

0 comments on commit 480e904

Please sign in to comment.