@@ -121,14 +121,25 @@ type MoneyReportHeaderProps = {
121
121
// eslint-disable-next-line react/no-unused-prop-types
122
122
transactionThreadReportID : string | undefined ;
123
123
124
+ /** whether we are loading report data in openReport command */
125
+ isLoadingInitialReportActions ?: boolean ;
126
+
124
127
/** Whether back button should be displayed in header */
125
128
shouldDisplayBackButton ?: boolean ;
126
129
127
130
/** Method to trigger when pressing close button of the header */
128
131
onBackButtonPress : ( ) => void ;
129
132
} ;
130
133
131
- function MoneyReportHeader ( { policy, report : moneyRequestReport , transactionThreadReportID, reportActions, shouldDisplayBackButton = false , onBackButtonPress} : MoneyReportHeaderProps ) {
134
+ function MoneyReportHeader ( {
135
+ policy,
136
+ report : moneyRequestReport ,
137
+ transactionThreadReportID,
138
+ reportActions,
139
+ isLoadingInitialReportActions,
140
+ shouldDisplayBackButton = false ,
141
+ onBackButtonPress,
142
+ } : MoneyReportHeaderProps ) {
132
143
// We need to use isSmallScreenWidth instead of shouldUseNarrowLayout to use a correct layout for the hold expense modal https://github.com/Expensify/App/pull/47990#issuecomment-2362382026
133
144
// eslint-disable-next-line rulesdir/prefer-shouldUseNarrowLayout-instead-of-isSmallScreenWidth
134
145
const { shouldUseNarrowLayout, isSmallScreenWidth, isMediumScreenWidth} = useResponsiveLayout ( ) ;
@@ -891,7 +902,8 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
891
902
/>
892
903
</ View >
893
904
) }
894
- { shouldShowNextStep && ( optimisticNextStep ?. message ?. length ? < MoneyReportHeaderStatusBar nextStep = { optimisticNextStep } /> : < MoneyReportHeaderStatusBarSkeleton /> ) }
905
+ { shouldShowNextStep && ! ! optimisticNextStep ?. message ?. length && < MoneyReportHeaderStatusBar nextStep = { optimisticNextStep } /> }
906
+ { shouldShowNextStep && ! optimisticNextStep ?. message ?. length && ! ! isLoadingInitialReportActions && < MoneyReportHeaderStatusBarSkeleton /> }
895
907
{ ! ! statusBarProps && (
896
908
< MoneyRequestHeaderStatusBar
897
909
icon = { statusBarProps . icon }
0 commit comments