@@ -129,8 +129,7 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
129129 const [ travelSettings ] = useOnyx ( ONYXKEYS . NVP_TRAVEL_SETTINGS , { canBeMissing : true } ) ;
130130
131131 const canSendInvoice = useMemo ( ( ) => canSendInvoicePolicyUtils ( allPolicies as OnyxCollection < OnyxTypes . Policy > , session ?. email ) , [ allPolicies , session ?. email ] ) ;
132- const isArchivedReport = useReportIsArchived ( quickActionReport ?. reportID ) ;
133- const isValidReport = ! ( isEmptyObject ( quickActionReport ) || isArchivedReport ) ;
132+ const isValidReport = ! ( isEmptyObject ( quickActionReport ) || isReportArchived ) ;
134133 const [ introSelected ] = useOnyx ( ONYXKEYS . NVP_INTRO_SELECTED , { canBeMissing : true } ) ;
135134 const [ hasSeenTour = false ] = useOnyx ( ONYXKEYS . NVP_ONBOARDING , {
136135 selector : hasSeenTourSelector ,
@@ -155,16 +154,16 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
155154
156155 const quickActionAvatars = useMemo ( ( ) => {
157156 if ( isValidReport ) {
158- const avatars = getIcons ( quickActionReport , personalDetails , null , undefined , undefined , undefined , undefined , isArchivedReport ) ;
157+ const avatars = getIcons ( quickActionReport , personalDetails , null , undefined , undefined , undefined , undefined , isReportArchived ) ;
159158 return avatars . length <= 1 || isPolicyExpenseChat ( quickActionReport ) ? avatars : avatars . filter ( ( avatar ) => avatar . id !== session ?. accountID ) ;
160159 }
161160 if ( ! isEmptyObject ( policyChatForActivePolicy ) ) {
162- return getIcons ( policyChatForActivePolicy , personalDetails , null , undefined , undefined , undefined , undefined , isArchivedReport ) ;
161+ return getIcons ( policyChatForActivePolicy , personalDetails , null , undefined , undefined , undefined , undefined , isReportArchived ) ;
163162 }
164163 return [ ] ;
165164 // Policy is needed as a dependency in order to update the shortcut details when the workspace changes
166165 // eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
167- } , [ personalDetails , session ?. accountID , quickActionReport , quickActionPolicy , policyChatForActivePolicy ] ) ;
166+ } , [ personalDetails , session ?. accountID , quickActionReport , quickActionPolicy , policyChatForActivePolicy , isReportArchived , isValidReport ] ) ;
168167
169168 const quickActionTitle = useMemo ( ( ) => {
170169 if ( isEmptyObject ( quickActionReport ) ) {
@@ -397,6 +396,7 @@ function FloatingActionButtonAndPopover({onHideCreateMenu, onShowCreateMenu, isT
397396 shouldUseNarrowLayout ,
398397 isDelegateAccessRestricted ,
399398 showDelegateNoAccessModal ,
399+ isReportArchived ,
400400 ] ) ;
401401
402402 const isTravelEnabled = useMemo ( ( ) => {
0 commit comments