Fix: Order of first and last names in save users
This commit is contained in:
parent
5b1c0bef9d
commit
1c777fca3b
@ -336,14 +336,14 @@ const getActiveChats = ({ groupChatsMessages, groupChats, users }) => {
|
||||
} else if (b.unreadCounter > a.unreadCounter) {
|
||||
return 1;
|
||||
} else {
|
||||
if (a.name.toLowerCase() < b.name.toLowerCase()) {
|
||||
return -1;
|
||||
}
|
||||
if (a.name.toLowerCase() > b.name.toLowerCase()) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
if (a.name.toLowerCase() < b.name.toLowerCase()) {
|
||||
return -1;
|
||||
}
|
||||
if (a.name.toLowerCase() > b.name.toLowerCase()) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
return sortByChatIdAndUnread;
|
||||
};
|
||||
@ -640,15 +640,15 @@ const requestUserInformation = (userId) => {
|
||||
};
|
||||
|
||||
const sortUsersByFirstName = (a, b) => {
|
||||
const aUser = { name: a.firstName ? a.firstName : '' };
|
||||
const bUser = { name: b.firstName ? b.firstName : '' };
|
||||
const aUser = { sortName: a.firstName ? a.firstName : '' };
|
||||
const bUser = { sortName: b.firstName ? b.firstName : '' };
|
||||
|
||||
return sortUsersByName(aUser, bUser);
|
||||
};
|
||||
|
||||
const sortUsersByLastName = (a, b) => {
|
||||
const aUser = { name: a.lastName ? a.lastName : '' };
|
||||
const bUser = { name: b.lastName ? b.lastName : '' };
|
||||
const aUser = { sortName: a.lastName ? a.lastName : '' };
|
||||
const bUser = { sortName: b.lastName ? b.lastName : '' };
|
||||
|
||||
return sortUsersByName(aUser, bUser);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user