Try isFocused on RoomsListView.sCU

This commit is contained in:
Diego Mello 2022-11-30 17:15:07 -03:00
parent 36f0935e55
commit 04e49563f2
1 changed files with 9 additions and 0 deletions

View File

@ -217,6 +217,15 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
} }
} }
shouldComponentUpdate(nextProps: Readonly<IRoomsListViewProps>): boolean {
// TODO: This COULD work, because when we pop from RoomView, we're going to update the sub
// But we need to check if it's really working
if (nextProps.navigation.isFocused()) {
return true;
}
return false;
}
componentDidUpdate(prevProps: IRoomsListViewProps) { componentDidUpdate(prevProps: IRoomsListViewProps) {
const { const {
sortBy, sortBy,