From 48ab8a4fe533790f3386f5f7f72cd2cf5f4aa3ce Mon Sep 17 00:00:00 2001 From: Mohammad Jafarinejad <71210799+mohammadjafarinejad@users.noreply.github.com> Date: Fri, 19 Dec 2025 09:12:45 +0400 Subject: [PATCH 1/3] Fix: User can't dismiss the modal, navigated to the Inbox after enabling microphone --- src/components/Onfido/index.native.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Onfido/index.native.tsx b/src/components/Onfido/index.native.tsx index dae7504a9d90..ecba88f831e4 100644 --- a/src/components/Onfido/index.native.tsx +++ b/src/components/Onfido/index.native.tsx @@ -75,12 +75,12 @@ function Onfido({sdkToken, onUserExit, onSuccess, onError}: OnfidoProps) { [ { text: translate('common.cancel'), - onPress: () => onUserExit(), + onPress: () => onUserExit(true), }, { text: translate('common.settings'), onPress: () => { - onUserExit(); + onUserExit(true); Linking.openSettings(); }, }, From 9c1e889e090d7967c2241137ad8e4201b3127ff3 Mon Sep 17 00:00:00 2001 From: Mohammad Jafarinejad <71210799+mohammadjafarinejad@users.noreply.github.com> Date: Mon, 22 Dec 2025 11:10:58 +0400 Subject: [PATCH 2/3] fix: save last route --- src/components/Onfido/index.native.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/Onfido/index.native.tsx b/src/components/Onfido/index.native.tsx index ecba88f831e4..d69078c07f4a 100644 --- a/src/components/Onfido/index.native.tsx +++ b/src/components/Onfido/index.native.tsx @@ -9,6 +9,7 @@ import Log from '@libs/Log'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import type {OnfidoError, OnfidoProps} from './types'; +import saveLastRoute from '@libs/saveLastRoute'; const {AppStateTracker} = NativeModules; @@ -80,8 +81,10 @@ function Onfido({sdkToken, onUserExit, onSuccess, onError}: OnfidoProps) { { text: translate('common.settings'), onPress: () => { - onUserExit(true); + onUserExit(false); Linking.openSettings(); + // Save last route before so navigation can be restored. + saveLastRoute(); }, }, ], From 1d6c1fadf1da9cc66f61a2ee757eedbcb09134a4 Mon Sep 17 00:00:00 2001 From: Mohammad Jafarinejad <71210799+mohammadjafarinejad@users.noreply.github.com> Date: Mon, 22 Dec 2025 11:13:50 +0400 Subject: [PATCH 3/3] chore: fix prettier --- src/components/Onfido/index.native.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Onfido/index.native.tsx b/src/components/Onfido/index.native.tsx index d69078c07f4a..b17ef2428031 100644 --- a/src/components/Onfido/index.native.tsx +++ b/src/components/Onfido/index.native.tsx @@ -6,10 +6,10 @@ import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator'; import useLocalize from '@hooks/useLocalize'; import getPlatform from '@libs/getPlatform'; import Log from '@libs/Log'; +import saveLastRoute from '@libs/saveLastRoute'; import CONST from '@src/CONST'; import type {TranslationPaths} from '@src/languages/types'; import type {OnfidoError, OnfidoProps} from './types'; -import saveLastRoute from '@libs/saveLastRoute'; const {AppStateTracker} = NativeModules;