From c3623f439cd87edb8ac6abfc61c0063c74c73bbe Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 24 Jul 2020 13:10:39 -0600 Subject: [PATCH] Rip hover support out of the RoomTile component It's all handled by CSS and this literally does nothing but spam renders. --- src/components/views/rooms/RoomTile.tsx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/components/views/rooms/RoomTile.tsx b/src/components/views/rooms/RoomTile.tsx index 1edbe83d31..b8406dc045 100644 --- a/src/components/views/rooms/RoomTile.tsx +++ b/src/components/views/rooms/RoomTile.tsx @@ -67,7 +67,6 @@ interface IProps { type PartialDOMRect = Pick; interface IState { - hover: boolean; notificationState: NotificationState; selected: boolean; notificationsMenuPosition: PartialDOMRect; @@ -119,7 +118,6 @@ export default class RoomTile extends React.Component { super(props); this.state = { - hover: false, notificationState: RoomNotificationStateStore.instance.getRoomState(this.props.room), selected: ActiveRoomObserver.activeRoomId === this.props.room.roomId, notificationsMenuPosition: null, @@ -206,14 +204,6 @@ export default class RoomTile extends React.Component { }); }; - private onTileMouseEnter = () => { - this.setState({hover: true}); - }; - - private onTileMouseLeave = () => { - this.setState({hover: false}); - }; - private onTileClick = (ev: React.KeyboardEvent) => { ev.preventDefault(); ev.stopPropagation(); @@ -592,8 +582,6 @@ export default class RoomTile extends React.Component { tabIndex={isActive ? 0 : -1} inputRef={ref} className={classes} - onMouseEnter={this.onTileMouseEnter} - onMouseLeave={this.onTileMouseLeave} onClick={this.onTileClick} onContextMenu={this.onContextMenu} role="treeitem"