fix: Dont send only whitespaces

onboarding
Christian Pauly 4 years ago
parent 1cfceb9a1e
commit 374efef73e

@ -195,7 +195,7 @@ class _ChatState extends State<Chat> {
TextEditingController sendController = TextEditingController();
void send() {
if (sendController.text.isEmpty) return;
if (sendController.text.trim().isEmpty) return;
room.sendTextEvent(sendController.text,
inReplyTo: replyEvent, editEventId: editEvent?.eventId);
sendController.text = pendingText;

Loading…
Cancel
Save