From 5a1d8645e17db84c5c607964bf818266a91d3e9e Mon Sep 17 00:00:00 2001 From: Guy Tepper Date: Sat, 9 Mar 2024 14:30:12 +0200 Subject: [PATCH] add delay to `isRouteInFuture` --- app/screens/route-details/components/start-ride-button.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/screens/route-details/components/start-ride-button.tsx b/app/screens/route-details/components/start-ride-button.tsx index dde08d0c..0dc34b07 100644 --- a/app/screens/route-details/components/start-ride-button.tsx +++ b/app/screens/route-details/components/start-ride-button.tsx @@ -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),