1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-22 04:02:40 +03:00

sort combined typing users by name so order is stable

This commit is contained in:
Bruno Windels
2019-01-21 17:49:46 +01:00
parent 25aa58f29f
commit 86357fde51

View File

@@ -191,6 +191,9 @@ module.exports = React.createClass({
// but have a timeout timer running so they can disappear // but have a timeout timer running so they can disappear
// when a message comes in // when a message comes in
usersTyping = usersTyping.concat(stoppedUsersOnTimer); usersTyping = usersTyping.concat(stoppedUsersOnTimer);
// sort them so the typing members don't change order when
// moved to delayedStopTypingTimers
usersTyping.sort((a, b) => a.name.localeCompare(b.name));
const typingString = WhoIsTyping.whoIsTypingString( const typingString = WhoIsTyping.whoIsTypingString(
usersTyping, usersTyping,