From e371bd95db5b85c055d7a97419d05e5d64008945 Mon Sep 17 00:00:00 2001 From: Wojciech Boman Date: Fri, 21 Mar 2025 12:19:12 +0100 Subject: [PATCH] Fix navigating after closing attachment modal --- src/components/AttachmentModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AttachmentModal.tsx b/src/components/AttachmentModal.tsx index 7831e116a89d..f76ade0db879 100644 --- a/src/components/AttachmentModal.tsx +++ b/src/components/AttachmentModal.tsx @@ -1,6 +1,6 @@ import {Str} from 'expensify-common'; import React, {memo, useCallback, useEffect, useMemo, useRef, useState} from 'react'; -import {Keyboard, View} from 'react-native'; +import {InteractionManager, Keyboard, View} from 'react-native'; import {GestureHandlerRootView} from 'react-native-gesture-handler'; import {useOnyx} from 'react-native-onyx'; import type {OnyxEntry} from 'react-native-onyx'; @@ -435,7 +435,7 @@ function AttachmentModal({ text: translate('common.replace'), onSelected: () => { closeModal(true); - Navigation.isNavigationReady().then(() => { + InteractionManager.runAfterInteractions(() => { Navigation.navigate( ROUTES.MONEY_REQUEST_STEP_SCAN.getRoute(CONST.IOU.ACTION.EDIT, iouType, transaction?.transactionID, report?.reportID, Navigation.getActiveRouteWithoutParams()), );