sort combined typing users by name so order is stable

pull/21833/head
Bruno Windels 2019-01-21 17:49:46 +01:00
parent 25aa58f29f
commit 86357fde51
1 changed files with 3 additions and 0 deletions

View File

@ -191,6 +191,9 @@ module.exports = React.createClass({
// but have a timeout timer running so they can disappear
// when a message comes in
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(
usersTyping,