From 1d864aee3cf1677c44c479dccc813fcebb48bdec Mon Sep 17 00:00:00 2001 From: Mateusz Rajski Date: Wed, 5 Nov 2025 13:26:05 +0100 Subject: [PATCH 1/2] Temporarily disable back buttons on FullscreenLoadingIndicator --- src/components/FullscreenLoadingIndicator.tsx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/components/FullscreenLoadingIndicator.tsx b/src/components/FullscreenLoadingIndicator.tsx index e94cf16a93b8..bc32e3c1f6e8 100644 --- a/src/components/FullscreenLoadingIndicator.tsx +++ b/src/components/FullscreenLoadingIndicator.tsx @@ -19,24 +19,37 @@ type FullScreenLoadingIndicatorProps = { /** Size of the icon */ iconSize?: FullScreenLoadingIndicatorIconSize; + /** Whether the "Go Back" button appears after a timeout. */ + shouldUseGoBackButton?: boolean; + /** The ID of the test to be used for testing */ testID?: string; /** Extra loading context to be passed to the logAppStateOnLongLoading function */ - extraLoadingContext?: ExtraLoadingContext; + extraLoadingContext?: ExtraLoadingContext; }; -function FullScreenLoadingIndicator({style, iconSize = CONST.ACTIVITY_INDICATOR_SIZE.LARGE, testID = '', extraLoadingContext}: FullScreenLoadingIndicatorProps) { +function FullScreenLoadingIndicator({ + style, + iconSize = CONST.ACTIVITY_INDICATOR_SIZE.LARGE, + shouldUseGoBackButton = false, + testID = '', + extraLoadingContext, +}: FullScreenLoadingIndicatorProps) { const styles = useThemeStyles(); const {translate} = useLocalize(); const [showGoBackButton, setShowGoBackButton] = useState(false); useEffect(() => { + if (!shouldUseGoBackButton) { + return; + } + const timeoutId = setTimeout(() => { setShowGoBackButton(true); }, CONST.TIMING.ACTIVITY_INDICATOR_TIMEOUT); return () => clearTimeout(timeoutId); - }, []); + }, [shouldUseGoBackButton]); return ( From 9fd2e107ba416f2da84891f5d2246d4a7170605a Mon Sep 17 00:00:00 2001 From: Mateusz Rajski Date: Wed, 5 Nov 2025 13:28:13 +0100 Subject: [PATCH 2/2] Remove extra spaces --- src/components/FullscreenLoadingIndicator.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FullscreenLoadingIndicator.tsx b/src/components/FullscreenLoadingIndicator.tsx index bc32e3c1f6e8..44dc1d87eb2a 100644 --- a/src/components/FullscreenLoadingIndicator.tsx +++ b/src/components/FullscreenLoadingIndicator.tsx @@ -26,7 +26,7 @@ type FullScreenLoadingIndicatorProps = { testID?: string; /** Extra loading context to be passed to the logAppStateOnLongLoading function */ - extraLoadingContext?: ExtraLoadingContext; + extraLoadingContext?: ExtraLoadingContext; }; function FullScreenLoadingIndicator({