@@ -805,7 +805,14 @@ function ReportActionsList({
805805 ) ;
806806 } , [ canShowHeader , retryLoadNewerChatsError ] ) ;
807807
808- const shouldShowSkeleton = isOffline && ! sortedVisibleReportActions . some ( ( action ) => action . actionName === CONST . REPORT . ACTIONS . TYPE . CREATED ) ;
808+ const shouldShowSkeleton = useMemo (
809+ ( ) => ( isOffline || ! reportMetadata ?. hasOnceLoadedReportActions ) && ! sortedVisibleReportActions . some ( ( action ) => action . actionName === CONST . REPORT . ACTIONS . TYPE . CREATED ) ,
810+ [ isOffline , reportMetadata ?. hasOnceLoadedReportActions , sortedVisibleReportActions ] ,
811+ ) ;
812+
813+ // While reportActions are loading, use the last reportAction as a fallback
814+ // since it’s available before the rest finish loading.
815+ const reportActionsToRender = useMemo ( ( ) => ( shouldShowSkeleton ? sortedVisibleReportActions . slice ( 0 , 1 ) : sortedVisibleReportActions ) , [ shouldShowSkeleton , sortedVisibleReportActions ] ) ;
809816
810817 const listFooterComponent = useMemo ( ( ) => {
811818 if ( ! shouldShowSkeleton ) {
@@ -860,7 +867,7 @@ function ReportActionsList({
860867 ref = { reportScrollManager . ref }
861868 testID = "report-actions-list"
862869 style = { styles . overscrollBehaviorContain }
863- data = { sortedVisibleReportActions }
870+ data = { reportActionsToRender }
864871 renderItem = { renderItem }
865872 renderScrollComponent = { renderActionSheetAwareScrollView }
866873 contentContainerStyle = { [ styles . chatContentScrollView , shouldFocusToTopOnMount ? styles . justifyContentEnd : undefined ] }
0 commit comments