patch send msg

This commit is contained in:
cheykrym 2025-10-22 05:49:19 +03:00
parent ee4f783fe7
commit bbed505033

View File

@ -265,7 +265,7 @@ struct PrivateChatView: View {
}
private var isSendDisabled: Bool {
draftText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || viewModel.isSending || currentUserId == nil
draftText.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty || currentUserId == nil
}
private var isSendAvailable: Bool {
@ -317,9 +317,9 @@ struct PrivateChatView: View {
let text = draftText.trimmingCharacters(in: .whitespacesAndNewlines)
guard !text.isEmpty else { return }
draftText = ""
viewModel.sendMessage(text: text) { success in
if success {
draftText = ""
hasPositionedToBottom = true
}
}