diff --git a/src/libs/NavBarManager/index.android.ts b/src/libs/NavBarManager/index.android.ts index 81a4626bfb08..681387886759 100644 --- a/src/libs/NavBarManager/index.android.ts +++ b/src/libs/NavBarManager/index.android.ts @@ -1,9 +1,15 @@ import {NativeModules} from 'react-native'; +import Log from '@libs/Log'; import type StartupTimer from './types'; import type {NavBarButtonStyle} from './types'; const navBarManager: StartupTimer = { setButtonStyle: (style: NavBarButtonStyle) => { + if (!NativeModules.RNNavBarManager) { + Log.hmmm('RNNavBarManager not found'); + return; + } + NativeModules.RNNavBarManager.setButtonStyle(style); }, }; diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.tsx b/src/libs/Navigation/AppNavigator/AuthScreens.tsx index 92195e12348a..689945da099e 100644 --- a/src/libs/Navigation/AppNavigator/AuthScreens.tsx +++ b/src/libs/Navigation/AppNavigator/AuthScreens.tsx @@ -261,6 +261,10 @@ function AuthScreens({session, lastOpenedPublicRoomID, initialLastUpdateIDApplie }); useEffect(() => { + if (!NavBarManager) { + Log.hmmm('RNNavBarManager not found in AuthScreens'); + return; + } NavBarManager.setButtonStyle(theme.navigationBarButtonsStyle); return () => {