Skip to content

Commit

Permalink
fix prevent brief hiding of Expense preview when returning to report …
Browse files Browse the repository at this point in the history
…via header subtitle
  • Loading branch information
huult committed Nov 6, 2024
1 parent 7b9a0cd commit 01a2f1f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import DateUtils from '@libs/DateUtils';
import isSearchTopmostCentralPane from '@libs/Navigation/isSearchTopmostCentralPane';
import Navigation from '@libs/Navigation/Navigation';
import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import * as ReportUtils from '@libs/ReportUtils';
Expand Down Expand Up @@ -699,7 +700,13 @@ function ReportActionsList({
}, [isLoadingNewerReportActions, canShowHeader, hasLoadingNewerReportActionsError, retryLoadNewerChatsError]);

const onStartReached = useCallback(() => {
InteractionManager.runAfterInteractions(() => requestAnimationFrame(() => loadNewerChats(false)));
const loadChats = () => loadNewerChats(false);

if (isSearchTopmostCentralPane()) {
InteractionManager.runAfterInteractions(() => requestAnimationFrame(loadChats));
} else {
loadChats();
}
}, [loadNewerChats]);

const onEndReached = useCallback(() => {
Expand Down

0 comments on commit 01a2f1f

Please sign in to comment.