mobile: send live message when there is any content (#1721)

* ios: send live message when there is any content

* android: improve live message logic

* fix, refactor

* prohibit live messages with quotes
This commit is contained in:
Evgeny Poberezkin 2023-01-11 12:01:02 +00:00 committed by GitHub
parent 9e3573fc76
commit a6d7604d21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 65 additions and 64 deletions

View file

@ -100,7 +100,9 @@ struct SendMessageView: View {
} else {
voiceMessageNotAllowedButton()
}
if let send = sendLiveMessage, let update = updateLiveMessage {
if let send = sendLiveMessage,
let update = updateLiveMessage,
case .noContextItem = composeState.contextItem {
startLiveMessageButton(send: send, update: update)
}
}
@ -137,11 +139,12 @@ struct SendMessageView: View {
!composeState.sendEnabled ||
composeState.disabled ||
(!voiceMessageAllowed && composeState.voicePreview) ||
(composeState.liveMessage != nil && composeState.message.isEmpty)
composeState.endLiveDisabled
)
.frame(width: 29, height: 29)
if composeState.liveMessage == nil,
case .noContextItem = composeState.contextItem,
!composeState.voicePreview && !composeState.editing,
let send = sendLiveMessage,
let update = updateLiveMessage {