fixed hiding bug caused by setTimeout

This commit is contained in:
Nouman Tahir 2022-09-05 19:03:09 +05:00
parent 370b624a12
commit 1aabca8669

View File

@ -89,7 +89,7 @@ const ForegroundNotification = ({ remoteMessage }: Props) => {
};
const hide = async () => {
if (isVisible && containerRef.current && containerRef.current.fadeOutUp) {
if (containerRef.current) {
await containerRef.current.fadeOutUp(300);
setIsVisible(false);
@ -124,7 +124,7 @@ const ForegroundNotification = ({ remoteMessage }: Props) => {
return (
isVisible &&
isVisible &&
<AnimatedView
ref={containerRef}
style={styles.container}