mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-29 04:39:53 +00:00
ios: hide voice message button in chat console (#1442)
This commit is contained in:
parent
5619152810
commit
7e204127b8
2 changed files with 4 additions and 2 deletions
|
@ -12,6 +12,7 @@ import SimpleXChat
|
|||
struct SendMessageView: View {
|
||||
@Binding var composeState: ComposeState
|
||||
var sendMessage: () -> Void
|
||||
var showVoiceMessageButton: Bool = true
|
||||
var voiceMessageAllowed: Bool = true
|
||||
var showEnableVoiceMessagesAlert: ChatInfo.ShowEnableVoiceMessagesAlert = .other
|
||||
var startVoiceMessageRecording: (() -> Void)? = nil
|
||||
|
@ -66,7 +67,8 @@ struct SendMessageView: View {
|
|||
.padding([.bottom, .trailing], 3)
|
||||
} else {
|
||||
let vmrs = composeState.voiceMessageRecordingState
|
||||
if composeState.message.isEmpty,
|
||||
if showVoiceMessageButton,
|
||||
composeState.message.isEmpty,
|
||||
!composeState.editing,
|
||||
(composeState.noPreview && vmrs == .noRecording)
|
||||
|| (vmrs == .recording && holdingVMR) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue