Merge pull request #1480 from matrix-org/t3chguy/fix_memberlist
T3chguy/fix memberlist
This commit is contained in:
commit
0284a582a1
1 changed files with 5 additions and 4 deletions
|
@ -146,8 +146,8 @@ module.exports = React.createClass({
|
||||||
const newState = {
|
const newState = {
|
||||||
members: this.roomMembers(),
|
members: this.roomMembers(),
|
||||||
};
|
};
|
||||||
newState.filteredJoinedMembers = this._filterMembers(newState.members, 'join');
|
newState.filteredJoinedMembers = this._filterMembers(newState.members, 'join', this.state.searchQuery);
|
||||||
newState.filteredInvitedMembers = this._filterMembers(newState.members, 'invite');
|
newState.filteredInvitedMembers = this._filterMembers(newState.members, 'invite', this.state.searchQuery);
|
||||||
this.setState(newState);
|
this.setState(newState);
|
||||||
}, 500),
|
}, 500),
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ module.exports = React.createClass({
|
||||||
const user_id = all_user_ids[i];
|
const user_id = all_user_ids[i];
|
||||||
const m = all_members[user_id];
|
const m = all_members[user_id];
|
||||||
|
|
||||||
if (m.membership == 'join' || m.membership == 'invite') {
|
if (m.membership === 'join' || m.membership === 'invite') {
|
||||||
if ((ConferenceHandler && !ConferenceHandler.isConferenceUser(user_id)) || !ConferenceHandler) {
|
if ((ConferenceHandler && !ConferenceHandler.isConferenceUser(user_id)) || !ConferenceHandler) {
|
||||||
to_display.push(user_id);
|
to_display.push(user_id);
|
||||||
++count;
|
++count;
|
||||||
|
@ -302,6 +302,7 @@ module.exports = React.createClass({
|
||||||
const m = this.memberDict[userId];
|
const m = this.memberDict[userId];
|
||||||
|
|
||||||
if (query) {
|
if (query) {
|
||||||
|
query = query.toLowerCase();
|
||||||
const matchesName = m.name.toLowerCase().indexOf(query) !== -1;
|
const matchesName = m.name.toLowerCase().indexOf(query) !== -1;
|
||||||
const matchesId = m.userId.toLowerCase().indexOf(query) !== -1;
|
const matchesId = m.userId.toLowerCase().indexOf(query) !== -1;
|
||||||
|
|
||||||
|
@ -310,7 +311,7 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return m.membership == membership;
|
return m.membership === membership;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue