feat: Send reactions to multiple events

This commit is contained in:
Krille Fear 2021-11-19 10:23:24 +01:00
commit cbf8e0799e
3 changed files with 56 additions and 50 deletions

View file

@ -631,14 +631,14 @@ class ChatController extends State<Chat> {
}
void sendEmojiAction(String emoji) async {
await showFutureLoadingDialog(
context: context,
future: () => room.sendReaction(
selectedEvents.single.eventId,
emoji,
),
);
final events = List<Event>.from(selectedEvents);
setState(() => selectedEvents.clear());
for (final event in events) {
await room.sendReaction(
event.eventId,
emoji,
);
}
}
void clearSelectedEvents() => setState(() {