feat: Regulate when thumbnails are animated as per MSC2705

This commit is contained in:
Sorunome 2020-12-29 10:43:32 +01:00
commit 62ab031d13
6 changed files with 14 additions and 8 deletions

View file

@ -1084,7 +1084,7 @@ class _ChatState extends State<_Chat> {
Timer(Duration(seconds: 2), () {
typingCoolDown = null;
currentlyTyping = false;
room.sendTypingInfo(false);
room.sendTypingNotification(false);
});
typingTimeout ??=
Timer(Duration(seconds: 30), () {
@ -1093,7 +1093,7 @@ class _ChatState extends State<_Chat> {
});
if (!currentlyTyping) {
currentlyTyping = true;
room.sendTypingInfo(true,
room.sendTypingNotification(true,
timeout: Duration(seconds: 30)
.inMilliseconds);
}