From 7109d2fd97b713910a33098cfafc29a6acc1d2a9 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Sat, 5 Oct 2024 20:00:10 +0800 Subject: [PATCH 1/2] fix can't close debug modal when open it with another modal is showing --- src/libs/Navigation/AppNavigator/AuthScreens.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index f5f35fd21025..4fd1ea986feb 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -391,9 +391,7 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie const unsubscribeDebugShortcut = KeyboardShortcut.subscribe( debugShortcutConfig.shortcutKey, - () => { - toggleTestToolsModal(); - }, + () => Modal.close(toggleTestToolsModal), debugShortcutConfig.descriptionKey, debugShortcutConfig.modifiers, true, From ccffbb62bd1bcce8a607bd2eee4fe5c88728c8f4 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Sat, 5 Oct 2024 20:00:25 +0800 Subject: [PATCH 2/2] move debug modal to authscreens --- src/components/ScreenWrapper.tsx | 2 -- src/libs/Navigation/AppNavigator/AuthScreens.tsx | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ScreenWrapper.tsx b/src/components/ScreenWrapper.tsx index 9a85e1d3af24..a72bbfded8a3 100644 --- a/src/components/ScreenWrapper.tsx +++ b/src/components/ScreenWrapper.tsx @@ -26,7 +26,6 @@ import ImportedStateIndicator from './ImportedStateIndicator'; import KeyboardAvoidingView from './KeyboardAvoidingView'; import OfflineIndicator from './OfflineIndicator'; import SafeAreaConsumer from './SafeAreaConsumer'; -import TestToolsModal from './TestToolsModal'; import withNavigationFallback from './withNavigationFallback'; type ScreenWrapperChildrenProps = { @@ -273,7 +272,6 @@ function ScreenWrapper( enabled={shouldEnablePickerAvoiding} > - {isDevelopment && } { diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index 4fd1ea986feb..35dcde0893c3 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -8,6 +8,7 @@ import ComposeProviders from '@components/ComposeProviders'; import OptionsListContextProvider from '@components/OptionListContextProvider'; import {SearchContextProvider} from '@components/Search/SearchContext'; import SearchRouterModal from '@components/Search/SearchRouter/SearchRouterModal'; +import TestToolsModal from '@components/TestToolsModal'; import useActiveWorkspace from '@hooks/useActiveWorkspace'; import useOnboardingFlowRouter from '@hooks/useOnboardingFlow'; import usePermissions from '@hooks/usePermissions'; @@ -589,6 +590,7 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie ); })} + {didPusherInit && }