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 } }