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