Remove isFocused logic from sCU
This commit is contained in:
parent
53cda7ecb1
commit
0c4c361446
|
@ -217,15 +217,6 @@ 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,
|
||||||
|
@ -394,6 +385,7 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
|
||||||
};
|
};
|
||||||
|
|
||||||
getSubscriptions = async () => {
|
getSubscriptions = async () => {
|
||||||
|
console.log('🚀 ~ file: index.tsx ~ line 408 ~ RoomsListView ~ getSubscriptions');
|
||||||
this.unsubscribeQuery();
|
this.unsubscribeQuery();
|
||||||
|
|
||||||
const { sortBy, showUnread, showFavorites, groupByType, user } = this.props;
|
const { sortBy, showUnread, showFavorites, groupByType, user } = this.props;
|
||||||
|
@ -884,7 +876,7 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
|
||||||
<FlashList
|
<FlashList
|
||||||
ref={this.getScrollRef}
|
ref={this.getScrollRef}
|
||||||
data={searching ? search : chats}
|
data={searching ? search : chats}
|
||||||
extraData={this.props}
|
extraData={theme}
|
||||||
keyExtractor={keyExtractor}
|
keyExtractor={keyExtractor}
|
||||||
renderItem={this.renderItem}
|
renderItem={this.renderItem}
|
||||||
getItemType={item => (item.separator ? 'section' : 'item')}
|
getItemType={item => (item.separator ? 'section' : 'item')}
|
||||||
|
|
Loading…
Reference in New Issue