mirror of https://github.com/vector-im/riot-web
Fix this/self fail in LeftPanel
parent
11d039477d
commit
534f9277d4
|
@ -191,6 +191,7 @@ module.exports = React.createClass({
|
|||
this.queryChangedDebouncer = setTimeout(() => {
|
||||
// Only do search if there is something to search
|
||||
if (query.length > 0 && query != '@') {
|
||||
performance.mark('start');
|
||||
// Weighted keys prefer to match userIds when first char is @
|
||||
this._fuse.options.keys = [{
|
||||
name: 'displayName',
|
||||
|
@ -199,6 +200,7 @@ module.exports = React.createClass({
|
|||
name: 'userId',
|
||||
weight: query[0] === '@' ? 0.9 : 0.1,
|
||||
}];
|
||||
performance.mark('middle');
|
||||
queryList = this._fuse.search(query).map((user) => {
|
||||
// Return objects, structure of which is defined
|
||||
// by InviteAddressType
|
||||
|
@ -210,6 +212,9 @@ module.exports = React.createClass({
|
|||
isKnown: true,
|
||||
}
|
||||
});
|
||||
performance.mark('end');
|
||||
performance.measure('setopts', 'start', 'middle');
|
||||
performance.measure('search', 'middle', 'end');
|
||||
|
||||
// If the query is a valid address, add an entry for that
|
||||
// This is important, otherwise there's no way to invite
|
||||
|
|
|
@ -652,7 +652,7 @@ module.exports = React.createClass({
|
|||
<RoomSubList list={ self.state.lists['m.favourite'] }
|
||||
label="Favourites"
|
||||
tagName="m.favourite"
|
||||
emptyContent={this._getEmptyContent('m.favourite')}
|
||||
emptyContent={self._getEmptyContent('m.favourite')}
|
||||
editable={ true }
|
||||
order="manual"
|
||||
incomingCall={ self.state.incomingCall }
|
||||
|
@ -665,8 +665,8 @@ module.exports = React.createClass({
|
|||
<RoomSubList list={ self.state.lists['im.vector.fake.direct'] }
|
||||
label="People"
|
||||
tagName="im.vector.fake.direct"
|
||||
emptyContent={this._getEmptyContent('im.vector.fake.direct')}
|
||||
headerItems={this._getHeaderItems('im.vector.fake.direct')}
|
||||
emptyContent={self._getEmptyContent('im.vector.fake.direct')}
|
||||
headerItems={self._getHeaderItems('im.vector.fake.direct')}
|
||||
editable={ true }
|
||||
order="recent"
|
||||
incomingCall={ self.state.incomingCall }
|
||||
|
@ -681,8 +681,8 @@ module.exports = React.createClass({
|
|||
label="Rooms"
|
||||
tagName="im.vector.fake.recent"
|
||||
editable={ true }
|
||||
emptyContent={this._getEmptyContent('im.vector.fake.recent')}
|
||||
headerItems={this._getHeaderItems('im.vector.fake.recent')}
|
||||
emptyContent={self._getEmptyContent('im.vector.fake.recent')}
|
||||
headerItems={self._getHeaderItems('im.vector.fake.recent')}
|
||||
order="recent"
|
||||
incomingCall={ self.state.incomingCall }
|
||||
collapsed={ self.props.collapsed }
|
||||
|
@ -697,7 +697,7 @@ module.exports = React.createClass({
|
|||
key={ tagName }
|
||||
label={ tagName }
|
||||
tagName={ tagName }
|
||||
emptyContent={this._getEmptyContent(tagName)}
|
||||
emptyContent={self._getEmptyContent(tagName)}
|
||||
editable={ true }
|
||||
order="manual"
|
||||
incomingCall={ self.state.incomingCall }
|
||||
|
@ -713,7 +713,7 @@ module.exports = React.createClass({
|
|||
<RoomSubList list={ self.state.lists['m.lowpriority'] }
|
||||
label="Low priority"
|
||||
tagName="m.lowpriority"
|
||||
emptyContent={this._getEmptyContent('m.lowpriority')}
|
||||
emptyContent={self._getEmptyContent('m.lowpriority')}
|
||||
editable={ true }
|
||||
order="recent"
|
||||
incomingCall={ self.state.incomingCall }
|
||||
|
|
Loading…
Reference in New Issue