Skip to content

Commit 0d8e5f4

Browse files
committed
fix: add initialWindowMetrics to SafeAreaProvider in ToastList component
1 parent efa82e5 commit 0d8e5f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/gluestack-core/src/toast/creator/ToastList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useKeyboardBottomInset } from '@gluestack-ui/utils/hooks';
33
import { Overlay } from '../../overlay/creator';
44
import React from 'react';
55
import { Platform, View } from 'react-native';
6-
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
6+
import { initialWindowMetrics, SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
77
import { OverlayAnimatePresence } from './OverlayAnimatePresence';
88
import { ToastContext } from './ToastContext';
99
import type { IToast, ToastPlacement } from './types';
@@ -92,7 +92,7 @@ export const ToastList = () => {
9292
>
9393
{toastInfo[position].map((toast: IToast) => {
9494
return (
95-
<SafeAreaProvider key={toast.id}>
95+
<SafeAreaProvider key={toast.id} initialMetrics={initialWindowMetrics}>
9696
<SafeAreaView style={{ pointerEvents: 'box-none' }}>
9797
<OverlayAnimatePresence
9898
visible={visibleToasts[toast.id]}

0 commit comments

Comments
 (0)