mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-04-02 05:56:53 +02:00
fix: Dont send only whitespaces
This commit is contained in:
parent
c4866c7728
commit
c0958c6733
@ -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…
x
Reference in New Issue
Block a user