From 28814e5a3de7b2c7d60e17597700bae5d2fb5292 Mon Sep 17 00:00:00 2001
From: Rory Abraham <47436092+roryabraham@users.noreply.github.com>
Date: Thu, 8 Jul 2021 11:10:25 -0700
Subject: [PATCH] Merge pull request #3908 from rdjuric/transitionFix
Improves transition when changing chats
(cherry picked from commit b1f09a3b276ea6b4771f285879d0ffa161f707ce)
---
src/pages/home/ReportScreen.js | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/pages/home/ReportScreen.js b/src/pages/home/ReportScreen.js
index 259ccaf20de5..0020eebdc831 100644
--- a/src/pages/home/ReportScreen.js
+++ b/src/pages/home/ReportScreen.js
@@ -34,15 +34,6 @@ class ReportScreen extends React.Component {
this.storeCurrentlyViewedReport();
}
- componentDidUpdate(prevProps) {
- const reportChanged = this.props.route.params.reportID !== prevProps.route.params.reportID;
-
- if (reportChanged) {
- this.prepareTransition();
- this.storeCurrentlyViewedReport();
- }
- }
-
componentWillUnmount() {
clearTimeout(this.loadingTimerId);
}
@@ -73,7 +64,7 @@ class ReportScreen extends React.Component {
this.setState({isLoading: true});
clearTimeout(this.loadingTimerId);
- this.loadingTimerId = setTimeout(() => this.setState({isLoading: false}), 300);
+ this.loadingTimerId = setTimeout(() => this.setState({isLoading: false}), 150);
}
/**
@@ -94,7 +85,7 @@ class ReportScreen extends React.Component {
-
+ {!this.shouldShowLoader() && }
);
}