This commit is contained in:
fmodf 2024-08-19 08:43:17 +02:00
parent 3f8fd23813
commit 9e8ae73ff7

View file

@ -57,7 +57,7 @@ struct ConversationTextInput: View {
.environmentObject(attachments)
}
}
TextField("", text: $messageStr, prompt: Text(L10n.Chat.textfieldPrompt).foregroundColor(.Material.Shape.separator))
TextField("", text: $messageStr, prompt: Text(L10n.Chat.textfieldPrompt).foregroundColor(.Material.Shape.separator), axis: .vertical)
.font(.body1)
.foregroundColor(Color.Material.Text.main)
.accentColor(.Material.Shape.black)
@ -77,6 +77,9 @@ struct ConversationTextInput: View {
messages.sendMessage(composedMessage)
messageStr = ""
autoScroll = true
if !messages.replyText.isEmpty {
messages.replyText = ""
}
}
}
}
@ -93,7 +96,7 @@ struct ConversationTextInput: View {
private var composedMessage: String {
var result = ""
if !messages.replyText.isEmpty {
result += messages.replyText + "\n\n"
result += messages.replyText.makeReply + "\n\n"
}
result += messageStr
return result