Merge pull request #2612 from matrix-org/bwindels/roomlistlag
Fix: roomlist reordering lags
This commit is contained in:
commit
240dc3c1cc
6 changed files with 51 additions and 64 deletions
|
@ -145,6 +145,7 @@ const RoomSubList = React.createClass({
|
|||
collapsed={this.props.collapsed || false}
|
||||
unread={Unread.doesRoomHaveUnreadMessages(room)}
|
||||
highlight={room.getUnreadNotificationCount('highlight') > 0 || this.props.isInvite}
|
||||
notificationCount={room.getUnreadNotificationCount()}
|
||||
isInvite={this.props.isInvite}
|
||||
refreshSubList={this._updateSubListCount}
|
||||
incomingCall={null}
|
||||
|
|
|
@ -21,7 +21,7 @@ import { _t } from '../../languageHandler';
|
|||
import { KeyCode } from '../../Keyboard';
|
||||
import sdk from '../../index';
|
||||
import dis from '../../dispatcher';
|
||||
import rate_limited_func from '../../ratelimitedfunc';
|
||||
import { debounce } from 'lodash';
|
||||
import AccessibleButton from '../../components/views/elements/AccessibleButton';
|
||||
|
||||
module.exports = React.createClass({
|
||||
|
@ -67,12 +67,9 @@ module.exports = React.createClass({
|
|||
this.onSearch();
|
||||
},
|
||||
|
||||
onSearch: new rate_limited_func(
|
||||
function() {
|
||||
this.props.onSearch(this.refs.search.value);
|
||||
},
|
||||
500,
|
||||
),
|
||||
onSearch: debounce(function() {
|
||||
this.props.onSearch(this.refs.search.value);
|
||||
}, 200, {trailing: true}),
|
||||
|
||||
_onKeyDown: function(ev) {
|
||||
switch (ev.keyCode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue