Skip to content

Commit

Permalink
[FIX] RoomsList update sometimes isn't fired (#2071)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Mello <diegolmello@gmail.com>
  • Loading branch information
djorkaeffalexandre and diegolmello authored Apr 30, 2020
1 parent 200f94e commit 022b033
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/views/RoomsListView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 022b033

Please sign in to comment.