Bugfix sending of typing events
parent
e8b944c0e1
commit
caa7f813eb
|
@ -351,15 +351,22 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
stopUserTypingTimer: function() {
|
stopUserTypingTimer: function() {
|
||||||
|
if (this.userTypingTimer) {
|
||||||
clearTimeout(this.userTypingTimer);
|
clearTimeout(this.userTypingTimer);
|
||||||
|
this.userTypingTimer = null;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
startServerTypingTimer: function() {
|
startServerTypingTimer: function() {
|
||||||
|
if (!this.serverTypingTimer) {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.serverTypingTimer = setTimeout(function() {
|
this.serverTypingTimer = setTimeout(function() {
|
||||||
|
if (self.isTyping) {
|
||||||
self.sendTyping(self.isTyping);
|
self.sendTyping(self.isTyping);
|
||||||
self.startServerTypingTimer();
|
self.startServerTypingTimer();
|
||||||
|
}
|
||||||
}, TYPING_SERVER_TIMEOUT / 2);
|
}, TYPING_SERVER_TIMEOUT / 2);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
stopServerTypingTimer: function() {
|
stopServerTypingTimer: function() {
|
||||||
|
|
Loading…
Reference in New Issue