Skip to content

Commit

Permalink
Merge pull request #50631 from mkzie2/mkzie2-issue/50419
Browse files Browse the repository at this point in the history
fix: report RHP turns to central pane after editing category and sending a message
  • Loading branch information
jasperhuangg authored Oct 15, 2024
2 parents 1a93716 + 67d9f71 commit 45e97d9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function ReportActionsList({
const styles = useThemeStyles();
const {translate} = useLocalize();
const {windowHeight} = useWindowDimensions();
const {shouldUseNarrowLayout} = useResponsiveLayout();
const {isInNarrowPaneModal, shouldUseNarrowLayout} = useResponsiveLayout();

const {isOffline} = useNetwork();
const route = useRoute<RouteProp<AuthScreensParamList, typeof SCREENS.REPORT>>();
Expand Down Expand Up @@ -346,12 +346,15 @@ function ReportActionsList({
return;
}
if (!hasNewestReportActionRef.current) {
if (isInNarrowPaneModal) {
return;
}
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(report.reportID));
return;
}
InteractionManager.runAfterInteractions(() => reportScrollManager.scrollToBottom());
},
[reportScrollManager, report.reportID],
[isInNarrowPaneModal, reportScrollManager, report.reportID],
);
useEffect(() => {
// Why are we doing this, when in the cleanup of the useEffect we are already calling the unsubscribe function?
Expand Down

0 comments on commit 45e97d9

Please sign in to comment.