From 022b0330bf9dd4064addb9a3c7345e02383b9ade Mon Sep 17 00:00:00 2001 From: Djorkaeff Alexandre Date: Thu, 30 Apr 2020 14:38:57 -0300 Subject: [PATCH] [FIX] RoomsList update sometimes isn't fired (#2071) Co-authored-by: Diego Mello --- app/views/RoomsListView/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/RoomsListView/index.js b/app/views/RoomsListView/index.js index 719a43f5..bb95377e 100644 --- a/app/views/RoomsListView/index.js +++ b/app/views/RoomsListView/index.js @@ -212,13 +212,17 @@ class RoomsListView extends React.Component { this.willFocusListener = navigation.addListener('willFocus', () => { // Check if there were changes while not focused (it's set on sCU) if (this.shouldUpdate) { - // animateNextTransition(); this.forceUpdate(); this.shouldUpdate = false; } }); this.didFocusListener = navigation.addListener('didFocus', () => { this.animated = true; + // Check if there were changes while not focused (it's set on sCU) + if (this.shouldUpdate) { + this.forceUpdate(); + this.shouldUpdate = false; + } this.backHandler = BackHandler.addEventListener('hardwareBackPress', this.handleBackPress); }); this.willBlurListener = navigation.addListener('willBlur', () => {