patch send msg
This commit is contained in:
parent
ee4f783fe7
commit
bbed505033
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user