mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-14 10:30:54 +03:00
ignore @ prefixes when sorting memberlist
This commit is contained in:
parent
c38c57df1e
commit
5835948a3d
1 changed files with 3 additions and 1 deletions
|
@ -387,7 +387,9 @@ module.exports = React.createClass({
|
||||||
// console.log(memberA + " and " + memberB + " have same power level");
|
// console.log(memberA + " and " + memberB + " have same power level");
|
||||||
if (memberA.name && memberB.name) {
|
if (memberA.name && memberB.name) {
|
||||||
// console.log("comparing names: " + memberA.name + " and " + memberB.name);
|
// console.log("comparing names: " + memberA.name + " and " + memberB.name);
|
||||||
return memberA.name.localeCompare(memberB.name);
|
var nameA = memberA.name[0] === '@' ? memberA.name.substr(1) : memberA.name;
|
||||||
|
var nameB = memberB.name[0] === '@' ? memberB.name.substr(1) : memberB.name;
|
||||||
|
return nameA.localeCompare(nameB);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue