fix: Dont send only whitespaces
This commit is contained in:
parent
1cfceb9a1e
commit
374efef73e
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ class _ChatState extends State<Chat> {
|
||||||
TextEditingController sendController = TextEditingController();
|
TextEditingController sendController = TextEditingController();
|
||||||
|
|
||||||
void send() {
|
void send() {
|
||||||
if (sendController.text.isEmpty) return;
|
if (sendController.text.trim().isEmpty) return;
|
||||||
room.sendTextEvent(sendController.text,
|
room.sendTextEvent(sendController.text,
|
||||||
inReplyTo: replyEvent, editEventId: editEvent?.eventId);
|
inReplyTo: replyEvent, editEventId: editEvent?.eventId);
|
||||||
sendController.text = pendingText;
|
sendController.text = pendingText;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue