Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Revert "Merge pull request #2396 from matrix-org/travis/room-list-hover"
Browse files Browse the repository at this point in the history
This reverts commit 5098b28.
  • Loading branch information
turt2live committed Jan 3, 2019
1 parent 0978687 commit d111fe2
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/components/views/rooms/RoomList.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ module.exports = React.createClass({
incomingCallTag: null,
incomingCall: null,
selectedTags: [],
hover: false,
};
},

Expand Down Expand Up @@ -295,17 +294,6 @@ module.exports = React.createClass({
this.forceUpdate();
},

onMouseEnter: function(ev) {
this.setState({hover: true});
},

onMouseLeave: function(ev) {
this.setState({hover: false});

// Refresh the room list just in case the user missed something.
this._delayedRefreshRoomList();
},

_delayedRefreshRoomList: new rate_limited_func(function() {
this.refreshRoomList();
}, 500),
Expand Down Expand Up @@ -358,11 +346,6 @@ module.exports = React.createClass({
},

refreshRoomList: function() {
if (this.state.hover) {
// Don't re-sort the list if we're hovering over the list
return;
}

// TODO: ideally we'd calculate this once at start, and then maintain
// any changes to it incrementally, updating the appropriate sublists
// as needed.
Expand Down Expand Up @@ -710,8 +693,7 @@ module.exports = React.createClass({
const subListComponents = this._mapSubListProps(subLists);

return (
<div ref={this._collectResizeContainer} className="mx_RoomList"
onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
<div ref={this._collectResizeContainer} className="mx_RoomList">
{ subListComponents }
</div>
);
Expand Down

0 comments on commit d111fe2

Please sign in to comment.