Skip to content

Commit

Permalink
fix: concurrent unmount when app is offline
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillzyusko committed Sep 3, 2024
1 parent 075dd98 commit d0c1bb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/OfflineWithFeedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function OfflineWithFeedback({
<View style={style}>
{!hideChildren && (
<View
style={[needsOpacity ? styles.offlineFeedback.pending : {}, contentContainerStyle]}
style={[needsOpacity ? styles.offlineFeedback.pending : styles.offlineFeedback.default, contentContainerStyle]}
needsOffscreenAlphaCompositing={shouldRenderOffscreen ? needsOpacity && needsOffscreenAlphaCompositing : undefined}
>
<CustomStylesForChildrenProvider style={needsStrikeThrough ? [styles.offlineFeedback.deleted, styles.userSelectNone] : null}>{children}</CustomStylesForChildrenProvider>
Expand Down
5 changes: 4 additions & 1 deletion src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<LineLayerStyleProps, 'lineColor' | 'lineWidth'>;

Expand Down Expand Up @@ -3450,6 +3450,9 @@ const styles = (theme: ThemeColors) =>
pending: {
opacity: 0.5,
},
default: {
opacity: 0.99,
},
error: {
flexDirection: 'row',
alignItems: 'center',
Expand Down

0 comments on commit d0c1bb9

Please sign in to comment.