refactor: Update dependencies

This commit is contained in:
Krille 2023-07-13 19:46:10 +09:00
commit 91fc889bce
20 changed files with 422 additions and 293 deletions

View file

@ -869,8 +869,11 @@ class ChatController extends State<ChatPageWithRoom> {
setState(() => showEmojiPicker = false);
if (emoji == null) return;
// make sure we don't send the same emoji twice
if (_allReactionEvents
.any((e) => e.content['m.relates_to']['key'] == emoji.emoji)) return;
if (_allReactionEvents.any(
(e) => e.content.tryGetMap('m.relates_to')?['key'] == emoji.emoji,
)) {
return;
}
return sendEmojiAction(emoji.emoji);
}