Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ function goBackFromSearchMoneyRequest() {
Navigation.goBack(ROUTES.SEARCH_ROOT.getRoute({query: buildCannedSearchQuery()}));
}

function InitialLoadingSkeleton({styles}: {styles: ThemeStyles}) {
function InitialLoadingSkeleton({styles, shouldAnimate}: {styles: ThemeStyles; shouldAnimate: boolean}) {
return (
<View style={[styles.flex1]}>
<View style={[styles.appContentHeader, styles.borderBottom]}>
<ReportHeaderSkeletonView onBackButtonPress={() => {}} />
</View>
<ReportActionsSkeletonView />
<ReportActionsSkeletonView shouldAnimate={shouldAnimate} />
</View>
);
}
Expand Down Expand Up @@ -179,7 +179,12 @@ function MoneyRequestReportView({report, policy, reportMetadata, shouldDisplayRe
);

if (!!(isLoadingInitialReportActions && reportActions.length === 0 && !isOffline) || shouldWaitForData) {
return <InitialLoadingSkeleton styles={styles} />;
return (
<InitialLoadingSkeleton
styles={styles}
shouldAnimate={!isOffline}
/>
);
}

if (reportActions.length === 0) {
Expand Down