ios: hide voice message button in chat console (#1442)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -86,7 +86,7 @@ struct TerminalView: View {
|
||||
SendMessageView(
|
||||
composeState: $composeState,
|
||||
sendMessage: sendMessage,
|
||||
voiceMessageAllowed: false,
|
||||
showVoiceMessageButton: false,
|
||||
keyboardVisible: $keyboardVisible
|
||||
)
|
||||
.padding(.horizontal, 12)
|
||||
|
||||
Reference in New Issue
Block a user