Merge pull request #5034 from matrix-org/travis/fix-perf

Mixed bag of performance improvements: ScrollPanel and notifications
This commit is contained in:
Travis Ralston 2020-07-22 08:24:04 -06:00 committed by GitHub
commit 67fd6e6122
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 114 additions and 59 deletions

View file

@ -44,7 +44,7 @@ export default class DecoratedRoomAvatar extends React.PureComponent<IProps, ISt
super(props);
this.state = {
notificationState: RoomNotificationStateStore.instance.getRoomState(this.props.room, this.props.tag),
notificationState: RoomNotificationStateStore.instance.getRoomState(this.props.room),
};
}

View file

@ -210,7 +210,7 @@ export default class RoomList extends React.Component<IProps, IState> {
if (unread) {
// filter to only notification rooms (and our current active room so we can index properly)
listRooms = listRooms.filter(r => {
const state = RoomNotificationStateStore.instance.getRoomState(r, t);
const state = RoomNotificationStateStore.instance.getRoomState(r);
return state.room.roomId === roomId || state.isUnread;
});
}

View file

@ -120,7 +120,7 @@ export default class RoomTile extends React.Component<IProps, IState> {
this.state = {
hover: false,
notificationState: RoomNotificationStateStore.instance.getRoomState(this.props.room, this.props.tag),
notificationState: RoomNotificationStateStore.instance.getRoomState(this.props.room),
selected: ActiveRoomObserver.activeRoomId === this.props.room.roomId,
notificationsMenuPosition: null,
generalMenuPosition: null,