11import { useNavigation } from '@react-navigation/native' ;
22import React , { useCallback , useEffect , useMemo , useRef , useState } from 'react' ;
33import { useOnyx } from 'react-native-onyx' ;
4+ import { updateChatPriorityMode } from '@libs/actions/User' ;
45import getIsNarrowLayout from '@libs/getIsNarrowLayout' ;
56import Log from '@libs/Log' ;
67import navigationRef from '@libs/Navigation/navigationRef' ;
78import { isReportParticipant , isValidReport } from '@libs/ReportUtils' ;
89import CONST from '@src/CONST' ;
910import ONYXKEYS from '@src/ONYXKEYS' ;
1011import SCREENS from '@src/SCREENS' ;
11- import { updateChatPriorityMode } from '@libs/actions/User' ;
1212import FocusModeNotification from './FocusModeNotification' ;
1313
1414/**
@@ -63,10 +63,10 @@ export default function PriorityModeController() {
6363 return ;
6464 }
6565
66- // We wait for the user to navigate back to the homescreen before triggering this switch
66+ // We wait for the user to navigate back to the home screen before triggering this switch
6767 const isNarrowLayout = getIsNarrowLayout ( ) ;
6868 if ( ( isNarrowLayout && currentRouteName !== SCREENS . HOME ) || ( ! isNarrowLayout && currentRouteName !== SCREENS . REPORT ) ) {
69- Log . info ( "[PriorityModeController] Not switching user to focus mode as they aren't on the homescreen " , false , { validReportCount, currentRouteName} ) ;
69+ Log . info ( "[PriorityModeController] Not switching user to focus mode as they aren't on the home screen " , false , { validReportCount, currentRouteName} ) ;
7070 return ;
7171 }
7272
@@ -76,7 +76,6 @@ export default function PriorityModeController() {
7676 hasSwitched . current = true ;
7777 } , [ accountID , currentRouteName , hasTriedFocusMode , isInFocusMode , isLoadingReportData , validReportCount ] ) ;
7878
79-
8079 return shouldShowModal ? < FocusModeNotification onClose = { closeModal } /> : null ;
8180}
8281
0 commit comments