This commit is contained in:
Diego Mello 2022-12-07 11:14:08 -03:00
parent 9788e8a11f
commit 15bb21eb2f
1 changed files with 0 additions and 12 deletions

View File

@ -136,8 +136,6 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
private count: number; private count: number;
private unsubscribeFocus?: () => void; private unsubscribeFocus?: () => void;
private unsubscribeBlur?: () => void; private unsubscribeBlur?: () => void;
private sortPreferencesChanged?: boolean;
private shouldUpdate?: boolean;
private backHandler?: NativeEventSubscription; private backHandler?: NativeEventSubscription;
private querySubscription?: Subscription; private querySubscription?: Subscription;
private scroll?: any; private scroll?: any;
@ -172,16 +170,6 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
this.unsubscribeFocus = navigation.addListener('focus', () => { this.unsubscribeFocus = navigation.addListener('focus', () => {
Orientation.unlockAllOrientations(); Orientation.unlockAllOrientations();
this.animated = true; this.animated = true;
// Check if there were changes with sort preference, then call getSubscription to remount the list
if (this.sortPreferencesChanged) {
this.getSubscriptions();
this.sortPreferencesChanged = false;
}
// 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.backHandler = BackHandler.addEventListener('hardwareBackPress', this.handleBackPress);
}); });
this.unsubscribeBlur = navigation.addListener('blur', () => { this.unsubscribeBlur = navigation.addListener('blur', () => {