Skip to content

Commit

Permalink
🐛 - Fixed android crashes (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
planecore authored Jun 13, 2023
1 parent d6c134b commit 81e2f7a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
16 changes: 9 additions & 7 deletions app/components/sheets/bottom-screen-sheet.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { View, ViewStyle, useColorScheme } from "react-native"
import { Platform, View, ViewStyle, useColorScheme } from "react-native"
import { BlurView } from "@react-native-community/blur"
import { useSafeAreaInsets } from "react-native-safe-area-context"
import { color } from "../../theme"
Expand Down Expand Up @@ -38,12 +38,14 @@ export function BottomScreenSheet({ children, style }: BottomScreenSheetProps) {
}}
>
{children}
<BlurView
style={{ position: "absolute", top: 0, left: 0, bottom: 0, right: 0, zIndex: -1 }}
blurType={isDarkMode ? "ultraThinMaterialDark" : "xlight"}
blurAmount={30}
reducedTransparencyFallbackColor={color.tertiaryBackground as unknown as string}
/>
{Platform.OS === "ios" && (
<BlurView
style={{ position: "absolute", top: 0, left: 0, bottom: 0, right: 0, zIndex: -1 }}
blurType={isDarkMode ? "ultraThinMaterialDark" : "xlight"}
blurAmount={30}
reducedTransparencyFallbackColor={color.tertiaryBackground as unknown as string}
/>
)}
</View>
)
}
4 changes: 2 additions & 2 deletions app/models/route-plan/route-plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ export const RoutePlanModel = types
.actions((self) => ({
setOrigin(station) {
self.origin = station
sendCurrentRouteToiOS(self.origin.id, self.destination?.id)
sendCurrentRouteToiOS(self.origin?.id, self.destination?.id)
},
setDestination(station) {
self.destination = station
sendCurrentRouteToiOS(self.origin.id, self.destination?.id)
sendCurrentRouteToiOS(self.origin?.id, self.destination?.id)
},
setDate(date) {
self.date = date
Expand Down
2 changes: 1 addition & 1 deletion app/screens/settings/components/settings-box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export const SettingBox = function SettingBox(props: SettingBoxProps) {
const { title, icon, first, last, externalLink, chevron, checkmark, onPress, toggle, style } = props
let boxStyle: ViewStyle = {}

if (!first) boxStyle = { borderTopColor: Platform.select({ android: "transparent", ios: color.background }), borderTopWidth: 1 }
if (!first && Platform.OS === "ios") boxStyle = { borderTopColor: color.background, borderTopWidth: 1 }

if (first) {
boxStyle = { borderTopLeftRadius: 10, borderTopRightRadius: 10, ...boxStyle }
Expand Down

0 comments on commit 81e2f7a

Please sign in to comment.