From bbed5050333fd43000d9ffb302c0372587f540db Mon Sep 17 00:00:00 2001 From: cheykrym Date: Wed, 22 Oct 2025 05:49:19 +0300 Subject: [PATCH] patch send msg --- yobble/Views/Chat/PrivateChatView.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yobble/Views/Chat/PrivateChatView.swift b/yobble/Views/Chat/PrivateChatView.swift index 7a21bf9..441f998 100644 --- a/yobble/Views/Chat/PrivateChatView.swift +++ b/yobble/Views/Chat/PrivateChatView.swift @@ -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 } }