Skip to content

Commit

Permalink
add delay to isRouteInFuture
Browse files Browse the repository at this point in the history
  • Loading branch information
guytepper committed Mar 9, 2024
1 parent 16e4aea commit 5a1d864
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/screens/route-details/components/start-ride-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const StartRideButton = observer(function StartRideButton(props: StartRid
* feature, it'll allow them to start a ride as if they were at Israel at the moment.
*/
const isRouteInPast = isAfter(timezoneCorrection(new Date()).getTime(), route.arrivalTime + route.delay * 60000)
const isRouteInFuture = differenceInMinutes(route.departureTime, timezoneCorrection(new Date()).getTime()) > 60
const isRouteInFuture = differenceInMinutes(route.departureTime + route.delay, timezoneCorrection(new Date()).getTime()) > 60

const areActivitiesDisabled = Platform.select({
ios: () => !canRunLiveActivities || !(ride?.activityAuthorizationInfo?.areActivitiesEnabled ?? true),
Expand Down

0 comments on commit 5a1d864

Please sign in to comment.