Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RequestScene to expect notifications #4927

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/components/common/SceneWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ function SceneWrapperComponent(props: SceneWrapperProps): JSX.Element {

// Calculate app insets considering the app's header, tab-bar,
// notification area, etc:
const maybeNotificationHeight = hasNotifications ? notificationHeight : 0

const maybeHeaderHeight = hasHeader ? headerBarHeight : 0
// Ignore tab bar height when keyboard is open because it is rendered behind it
const maybeTabBarHeight = hasTabs && !isKeyboardOpen ? MAX_TAB_BAR_HEIGHT : 0
Expand All @@ -170,10 +172,19 @@ function SceneWrapperComponent(props: SceneWrapperProps): JSX.Element {
() => ({
top: safeAreaInsets.top + maybeHeaderHeight,
right: safeAreaInsets.right,
bottom: maybeInsetBottom + notificationHeight + maybeTabBarHeight + footerHeight,
bottom: maybeInsetBottom + maybeNotificationHeight + maybeTabBarHeight + footerHeight,
left: safeAreaInsets.left
}),
[footerHeight, maybeHeaderHeight, maybeInsetBottom, notificationHeight, maybeTabBarHeight, safeAreaInsets.left, safeAreaInsets.right, safeAreaInsets.top]
[
footerHeight,
maybeHeaderHeight,
maybeInsetBottom,
maybeNotificationHeight,
maybeTabBarHeight,
safeAreaInsets.left,
safeAreaInsets.right,
safeAreaInsets.top
]
)

// This is a convenient styles object which may be applied as
Expand Down
Loading