Skip to content

Commit 1aeafdf

Browse files
authored
Merge pull request #7020 from StoDevX/android-borderColor-fix
Fix Android `borderColor` crash when setting transparent border on bus screen
2 parents f892f85 + d88aeaa commit 1aeafdf

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

source/views/transportation/bus/components/bus-stop-row.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as React from 'react'
2-
import {Platform, StyleSheet} from 'react-native'
2+
import {ColorValue, Platform, StyleSheet} from 'react-native'
33
import {Column} from '@frogpond/layout'
44
import {Detail, ListRow, Title} from '@frogpond/lists'
55
import type {BusTimetableEntry} from '../types'
@@ -36,8 +36,8 @@ type Props = {
3636
stop: BusTimetableEntry
3737
departureIndex: null | number
3838
now: Moment
39-
barColor: string
40-
currentStopColor: string
39+
barColor: ColorValue
40+
currentStopColor: ColorValue
4141
isFirstRow: boolean
4242
isLastRow: boolean
4343
status: BusStateEnum

source/views/transportation/bus/components/progress-chunk.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as React from 'react'
22
import * as c from '@frogpond/colors'
3-
import {Platform, StyleSheet, View} from 'react-native'
3+
import {ColorValue, Platform, StyleSheet, View} from 'react-native'
44
import type {BusStopStatusEnum} from '../lib'
55

66
const isAndroid = Platform.OS === 'android'
@@ -25,7 +25,7 @@ const styles = StyleSheet.create({
2525
},
2626
skippingStop: {
2727
backgroundColor: c.clear,
28-
borderColor: c.clear,
28+
borderColor: c.transparent,
2929
},
3030
passedStop: {
3131
height: 12,
@@ -47,8 +47,8 @@ const styles = StyleSheet.create({
4747
})
4848

4949
type Props = {
50-
barColor: string
51-
currentStopColor: string
50+
barColor: ColorValue
51+
currentStopColor: ColorValue
5252
isFirstChunk: boolean
5353
isLastChunk: boolean
5454
stopStatus: BusStopStatusEnum

source/views/transportation/bus/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import type {Moment} from 'moment'
2+
import {ColorValue} from 'react-native'
23

34
export type DayOfWeek = 'Su' | 'Mo' | 'Tu' | 'We' | 'Th' | 'Fr' | 'Sa'
45
export type Coordinates = [number, number]
56

67
export type BusLineColors = {
7-
bar: string
8-
dot: string
8+
bar: ColorValue
9+
dot: ColorValue
910
}
1011

1112
export type UnprocessedDepartureTimeList = Array<string | false>

0 commit comments

Comments
 (0)