Skip to content

Commit

Permalink
fixup! Fix incorrect rounded corners on iOS This regressed as a resul…
Browse files Browse the repository at this point in the history
…t of changes to support rounded blur corners for iOS in the latest `NotificationCard` updates (66b4bdd).
  • Loading branch information
Jon-edge committed Nov 13, 2024
1 parent dbf6092 commit e3f7f68
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions src/components/common/BlurBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ import { cacheStyles, Theme, useTheme } from '../services/ThemeContext'

const isAndroid = Platform.OS === 'android'

export const BlurBackground = (props: { roundCorners?: boolean }) => {
const { roundCorners = false } = props
export const BlurBackground = (props: { noRoundedCorners?: boolean }) => {
const { noRoundedCorners = false } = props
const theme = useTheme()
const styles = getStyles(theme)

return (
<BlurView blurType={theme.isDark ? 'dark' : 'light'} style={[styles.blurView, roundCorners ? styles.roundCorner : {}]} overlayColor="rgba(0, 0, 0, 0)" />
<BlurView
blurType={theme.isDark ? 'dark' : 'light'}
style={[styles.blurView, noRoundedCorners ? {} : styles.roundCorner]}
overlayColor="rgba(0, 0, 0, 0)"
/>
)
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/navigation/HeaderBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const HeaderBackground = (props: any) => {

return (
<HeaderBackgroundContainerView scrollY={scrollY}>
<BlurBackground />
<BlurBackground noRoundedCorners />
<HeaderLinearGradient colors={theme.headerBackground} start={theme.headerBackgroundStart} end={theme.headerBackgroundEnd} />
<DividerLine colors={theme.headerOutlineColors} />
</HeaderBackgroundContainerView>
Expand Down
2 changes: 1 addition & 1 deletion src/components/themed/MenuTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const MenuTabs = (props: BottomTabBarProps) => {
return (
<Container shiftY={shiftY} pointerEvents="box-none">
<Background footerHeight={footerHeight} openRatio={footerOpenRatio} tabLabelHeight={tabLabelHeight} pointerEvents="none">
<BlurBackground />
<BlurBackground noRoundedCorners />
<BackgroundLinearGradient colors={theme.tabBarBackground} start={theme.tabBarBackgroundStart} end={theme.tabBarBackgroundEnd} />
</Background>
{renderFooter()}
Expand Down

0 comments on commit e3f7f68

Please sign in to comment.