Trim text before sending it

This commit is contained in:
Sylvain Berfini 2021-04-13 19:12:44 +02:00
parent a0511246cd
commit 6bd231098a

View file

@ -113,7 +113,7 @@ class ChatMessageSendingViewModel(private val chatRoom: ChatRoom) : ViewModel()
val toSend = textToSend.value val toSend = textToSend.value
if (toSend != null && toSend.isNotEmpty()) { if (toSend != null && toSend.isNotEmpty()) {
message.addUtf8TextContent(toSend) message.addUtf8TextContent(toSend.trim())
} }
var fileContent = false var fileContent = false