mirror of https://github.com/vector-im/riot-web
Revert "Merge pull request #2396 from matrix-org/travis/room-list-hover"
This reverts commit 5098b28672
.
pull/21833/head
parent
0978687c65
commit
d111fe27bb
|
@ -86,7 +86,6 @@ module.exports = React.createClass({
|
||||||
incomingCallTag: null,
|
incomingCallTag: null,
|
||||||
incomingCall: null,
|
incomingCall: null,
|
||||||
selectedTags: [],
|
selectedTags: [],
|
||||||
hover: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -295,17 +294,6 @@ module.exports = React.createClass({
|
||||||
this.forceUpdate();
|
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() {
|
_delayedRefreshRoomList: new rate_limited_func(function() {
|
||||||
this.refreshRoomList();
|
this.refreshRoomList();
|
||||||
}, 500),
|
}, 500),
|
||||||
|
@ -358,11 +346,6 @@ module.exports = React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
refreshRoomList: function() {
|
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
|
// TODO: ideally we'd calculate this once at start, and then maintain
|
||||||
// any changes to it incrementally, updating the appropriate sublists
|
// any changes to it incrementally, updating the appropriate sublists
|
||||||
// as needed.
|
// as needed.
|
||||||
|
@ -710,8 +693,7 @@ module.exports = React.createClass({
|
||||||
const subListComponents = this._mapSubListProps(subLists);
|
const subListComponents = this._mapSubListProps(subLists);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={this._collectResizeContainer} className="mx_RoomList"
|
<div ref={this._collectResizeContainer} className="mx_RoomList">
|
||||||
onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave}>
|
|
||||||
{ subListComponents }
|
{ subListComponents }
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue