Skip to content

Commit 8611039

Browse files
committed
fix: StopCallout text not showing on android + uses selected index for getting pattern path
1 parent 49bab0f commit 8611039

2 files changed

Lines changed: 12 additions & 14 deletions

File tree

app/components/map/StopCallout.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1+
import { useStopEstimate } from 'app/data/api_query';
2+
import useAppStore from 'app/data/app_state';
3+
import { lightMode } from 'app/theme';
4+
import moment from 'moment';
15
import React, { memo } from 'react';
2-
import { View, Text, ActivityIndicator, Platform } from 'react-native';
6+
import { ActivityIndicator, Platform, Text, View } from 'react-native';
37
import { Callout } from 'react-native-maps';
4-
import BusIcon from '../ui/BusIcon';
58
import { IMapRoute, IStop } from '../../../utils/interfaces';
6-
import { useStopEstimate } from 'app/data/api_query';
7-
import moment from 'moment';
8-
import CalloutTimeBubble from '../ui/CalloutTimeBubble';
9-
import { lightMode } from 'app/theme';
109
import AmenityRow from '../ui/AmenityRow';
11-
import useAppStore from 'app/data/app_state';
10+
import BusIcon from '../ui/BusIcon';
11+
import CalloutTimeBubble from '../ui/CalloutTimeBubble';
1212

1313
interface Props {
1414
stop: IStop;
@@ -71,7 +71,10 @@ const StopCallout: React.FC<Props> = ({
7171
isCallout={true}
7272
style={{ marginRight: 8 }}
7373
/>
74-
<Text style={{ flex: 1, fontWeight: 'bold' }} numberOfLines={2}>
74+
<Text
75+
style={{ flex: 1, fontWeight: 'bold', color: 'black' }}
76+
numberOfLines={2}
77+
>
7578
{stop.name}
7679
</Text>
7780
<AmenityRow

app/components/sheets/RouteDetails.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,7 @@ const RouteDetails: React.FC<SheetProps> = ({ sheetRef }) => {
6969
// Filters patternPaths for only the selected route from all patternPaths
7070
function getPatternPathForSelectedRoute(): IPatternPath | undefined {
7171
if (!selectedRoute) return undefined;
72-
return selectedRoute.patternPaths.find(
73-
(direction) =>
74-
direction.patternKey ===
75-
selectedRoute.directionList[selectedDirectionIndex]?.patternList[0]
76-
?.key,
77-
);
72+
return selectedRoute.patternPaths[selectedDirectionIndex];
7873
}
7974

8075
const handleDismiss = () => {

0 commit comments

Comments
 (0)