From 538d4d2187c6b69330c0e1221dc4461f28a58760 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Mon, 21 Sep 2020 17:34:51 +0200 Subject: [PATCH] Wait a few milliseconds before refreshing list --- src/components/Screens/WebSectionList.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Screens/WebSectionList.js b/src/components/Screens/WebSectionList.js index 8317d8a..08f9b86 100644 --- a/src/components/Screens/WebSectionList.js +++ b/src/components/Screens/WebSectionList.js @@ -99,7 +99,9 @@ class WebSectionList extends React.PureComponent, StateType> { */ onScreenFocus = () => { const {props} = this; - if (props.refreshOnFocus && this.lastRefresh) this.onRefresh(); + if (props.refreshOnFocus && this.lastRefresh) { + setTimeout(this.onRefresh, 200); + } if (props.autoRefreshTime > 0) this.refreshInterval = setInterval(this.onRefresh, props.autoRefreshTime); };