Use single state to set both avatars and typing notif

This commit is contained in:
Luke Barnard 2017-02-09 10:01:51 +00:00
parent ad2710ec5d
commit cc69e982a7
2 changed files with 10 additions and 14 deletions

View file

@ -48,8 +48,7 @@ module.exports = {
return whoIsTyping;
},
whoIsTypingString: function(room, limit) {
const whoIsTyping = this.usersTypingApartFromMe(room);
whoIsTypingString: function(whoIsTyping, limit) {
const othersCount = limit === undefined ?
0 : Math.max(whoIsTyping.length - limit, 0);
if (whoIsTyping.length == 0) {