Skip to content

Commit 4885827

Browse files
fix: surface createReport error in inbox ReportScreen and dismiss via goBack afterTransition
1 parent 21e6bdc commit 4885827

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/pages/inbox/ReportScreen.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,9 @@ function ReportScreen({route, navigation}: ReportScreenProps) {
132132
const {reportPendingAction, reportErrors} = reportPendingActionAndErrors ?? {};
133133

134134
const dismissReportCreationError = () => {
135-
Navigation.goBack();
136-
// Defer the Onyx wipe until after the back-navigation animation completes so the user
137-
// doesn't see the report disappear from underneath them mid-transition. InteractionManager
138-
// is the cross-platform primitive for this; the Promise-based replacement isn't available yet.
139-
// eslint-disable-next-line @typescript-eslint/no-deprecated
140-
InteractionManager.runAfterInteractions(() => removeFailedReport(reportIDFromRoute));
135+
Navigation.goBack(undefined, {
136+
afterTransition: () => removeFailedReport(reportIDFromRoute),
137+
});
141138
};
142139

143140
return (

0 commit comments

Comments
 (0)