Fix list extra data
This commit is contained in:
parent
c610b6d7ec
commit
fd82771438
|
@ -220,8 +220,17 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { sortBy, groupByType, showFavorites, showUnread, subscribedRoom, isMasterDetail, showAvatar, displayMode } =
|
const {
|
||||||
this.props;
|
sortBy,
|
||||||
|
groupByType,
|
||||||
|
showFavorites,
|
||||||
|
showUnread,
|
||||||
|
subscribedRoom,
|
||||||
|
isMasterDetail,
|
||||||
|
showAvatar,
|
||||||
|
displayMode,
|
||||||
|
encryptionBanner
|
||||||
|
} = this.props;
|
||||||
if (
|
if (
|
||||||
sortBy !== nextProps.sortBy ||
|
sortBy !== nextProps.sortBy ||
|
||||||
groupByType !== nextProps.groupByType ||
|
groupByType !== nextProps.groupByType ||
|
||||||
|
@ -230,7 +239,8 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
|
||||||
showAvatar !== nextProps.showAvatar ||
|
showAvatar !== nextProps.showAvatar ||
|
||||||
displayMode !== nextProps.displayMode ||
|
displayMode !== nextProps.displayMode ||
|
||||||
subscribedRoom !== nextProps.subscribedRoom ||
|
subscribedRoom !== nextProps.subscribedRoom ||
|
||||||
isMasterDetail !== nextProps.isMasterDetail
|
isMasterDetail !== nextProps.isMasterDetail ||
|
||||||
|
encryptionBanner !== nextProps.encryptionBanner
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -883,7 +893,8 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
|
||||||
|
|
||||||
render = () => {
|
render = () => {
|
||||||
console.count(`${this.constructor.name}.render calls`);
|
console.count(`${this.constructor.name}.render calls`);
|
||||||
const { showServerDropdown, theme, navigation, refreshing, displayMode } = this.props;
|
const { showServerDropdown, theme, navigation, refreshing, displayMode, queueSize, inquiryEnabled, encryptionBanner } =
|
||||||
|
this.props;
|
||||||
const { loading, chats, search, searching } = this.state;
|
const { loading, chats, search, searching } = this.state;
|
||||||
|
|
||||||
const height = displayMode === DisplayMode.Condensed ? ROW_HEIGHT_CONDENSED : ROW_HEIGHT;
|
const height = displayMode === DisplayMode.Condensed ? ROW_HEIGHT_CONDENSED : ROW_HEIGHT;
|
||||||
|
@ -899,7 +910,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={theme}
|
extraData={{ theme, queueSize, inquiryEnabled, encryptionBanner }}
|
||||||
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