diff --git a/app/src/main/java/io/homeassistant/companion/android/assist/AssistViewModel.kt b/app/src/main/java/io/homeassistant/companion/android/assist/AssistViewModel.kt index abafb4b8af8..b8c86414dec 100644 --- a/app/src/main/java/io/homeassistant/companion/android/assist/AssistViewModel.kt +++ b/app/src/main/java/io/homeassistant/companion/android/assist/AssistViewModel.kt @@ -293,7 +293,7 @@ class AssistViewModel @Inject constructor( ) { newMessage, isInput, isError -> _conversation.indexOf(message).takeIf { pos -> pos >= 0 }?.let { index -> _conversation[index] = message.copy( - message = newMessage, + message = newMessage.trim(), isInput = isInput ?: message.isInput, isError = isError ) diff --git a/wear/src/main/java/io/homeassistant/companion/android/conversation/ConversationViewModel.kt b/wear/src/main/java/io/homeassistant/companion/android/conversation/ConversationViewModel.kt index 265a66a7640..1eeb6e1759f 100755 --- a/wear/src/main/java/io/homeassistant/companion/android/conversation/ConversationViewModel.kt +++ b/wear/src/main/java/io/homeassistant/companion/android/conversation/ConversationViewModel.kt @@ -262,7 +262,7 @@ class ConversationViewModel @Inject constructor( ) { newMessage, isInput, isError -> _conversation.indexOf(message).takeIf { pos -> pos >= 0 }?.let { index -> _conversation[index] = message.copy( - message = newMessage, + message = newMessage.trim(), isInput = isInput ?: message.isInput, isError = isError )