forked from vergnet/application-amicale
Wait a few milliseconds before refreshing list
This commit is contained in:
parent
b654a928a2
commit
538d4d2187
1 changed files with 3 additions and 1 deletions
|
@ -99,7 +99,9 @@ class WebSectionList<T> extends React.PureComponent<PropsType<T>, 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);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue