fix typing expiry

pull/225/head
Aevann 2024-03-09 08:23:35 +02:00
parent 885604c655
commit bc192e8eb3
1 changed files with 1 additions and 2 deletions

View File

@ -241,8 +241,6 @@ function remove_typing() {
}
ta.addEventListener("input", function() {
clearTimeout(timer_id)
text = ta.value
if (!text && is_typing){
is_typing = false;
@ -251,6 +249,7 @@ ta.addEventListener("input", function() {
else if (text && !is_typing) {
is_typing = true;
socket.emit('typing', true);
clearTimeout(timer_id)
timer_id = setTimeout(remove_typing, 2000);
}
})