Skip to content

Commit

Permalink
Merge pull request #50280 from bernhardoj/fix/49802-esc-key-doesnt-cl…
Browse files Browse the repository at this point in the history
…ose-debug-modal

Fix ESC key doesn't close debug modal
  • Loading branch information
marcochavezf authored Oct 28, 2024
2 parents 3540a3b + 641c2a0 commit 7600c81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/components/ScreenWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -277,7 +276,6 @@ function ScreenWrapper(
enabled={shouldEnablePickerAvoiding}
>
<HeaderGap styles={headerGapStyles} />
<TestToolsModal />
{isDevelopment && <CustomDevMenu />}
<ScreenWrapperStatusContext.Provider value={contextValue}>
{
Expand Down
6 changes: 3 additions & 3 deletions src/libs/Navigation/AppNavigator/AuthScreens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import OptionsListContextProvider from '@components/OptionListContextProvider';
import {SearchContextProvider} from '@components/Search/SearchContext';
import {useSearchRouterContext} from '@components/Search/SearchRouter/SearchRouterContext';
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';
Expand Down Expand Up @@ -381,9 +382,7 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie

const unsubscribeDebugShortcut = KeyboardShortcut.subscribe(
debugShortcutConfig.shortcutKey,
() => {
toggleTestToolsModal();
},
() => Modal.close(toggleTestToolsModal),
debugShortcutConfig.descriptionKey,
debugShortcutConfig.modifiers,
true,
Expand Down Expand Up @@ -581,6 +580,7 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie
);
})}
</RootStack.Navigator>
<TestToolsModal />
<SearchRouterModal />
</View>
{didPusherInit && <ActiveGuidesEventListener />}
Expand Down

0 comments on commit 7600c81

Please sign in to comment.