diff --git a/src/components/OfflineWithFeedback.tsx b/src/components/OfflineWithFeedback.tsx index a3f7b77da329..32e5a128bcf0 100644 --- a/src/components/OfflineWithFeedback.tsx +++ b/src/components/OfflineWithFeedback.tsx @@ -142,7 +142,7 @@ function OfflineWithFeedback({ )} {!hideChildren && ( {children} diff --git a/src/styles/index.ts b/src/styles/index.ts index 179e886d08ff..5c813998267b 100644 --- a/src/styles/index.ts +++ b/src/styles/index.ts @@ -3,7 +3,7 @@ import type {LineLayerStyleProps} from '@rnmapbox/maps/src/utils/MapboxStyles'; import lodashClamp from 'lodash/clamp'; import type {LineLayer} from 'react-map-gl'; import type {AnimatableNumericValue, Animated, ImageStyle, TextStyle, ViewStyle} from 'react-native'; -import {StyleSheet} from 'react-native'; +import {Platform, StyleSheet} from 'react-native'; import type {CustomAnimation} from 'react-native-animatable'; import type {PickerStyle} from 'react-native-picker-select'; import type {MixedStyleDeclaration, MixedStyleRecord} from 'react-native-render-html'; @@ -71,7 +71,7 @@ type WorkspaceUpgradeIntroBoxParams = {isExtraSmallScreenWidth: boolean; isSmall type Translation = 'perspective' | 'rotate' | 'rotateX' | 'rotateY' | 'rotateZ' | 'scale' | 'scaleX' | 'scaleY' | 'translateX' | 'translateY' | 'skewX' | 'skewY' | 'matrix'; -type OfflineFeedbackStyle = Record<'deleted' | 'pending' | 'error' | 'container' | 'textContainer' | 'text' | 'errorDot', ViewStyle | TextStyle>; +type OfflineFeedbackStyle = Record<'deleted' | 'pending' | 'default' | 'error' | 'container' | 'textContainer' | 'text' | 'errorDot', ViewStyle | TextStyle>; type MapDirectionStyle = Pick; @@ -3450,6 +3450,12 @@ const styles = (theme: ThemeColors) => pending: { opacity: 0.5, }, + default: { + // fixes a crash on iOS when we attempt to remove already unmounted children + // see https://github.com/Expensify/App/issues/48197 for more details + // it's a temporary solution while we are working on a permanent fix + opacity: Platform.OS === 'ios' ? 0.99 : undefined, + }, error: { flexDirection: 'row', alignItems: 'center',