mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-05 00:15:59 +00:00
ios: fix padding in send button context menu (#1618)
This commit is contained in:
committed by
GitHub
parent
9e045a44db
commit
36eba01ef4
@@ -104,21 +104,7 @@ struct SendMessageView: View {
|
||||
} else if vmrs == .recording && !holdingVMR {
|
||||
finishVoiceMessageRecordingButton()
|
||||
} else {
|
||||
let v = sendMessageButton()
|
||||
if composeState.liveMessage == nil,
|
||||
!composeState.voicePreview && !composeState.editing,
|
||||
let send = sendLiveMessage,
|
||||
let update = updateLiveMessage {
|
||||
v.contextMenu{
|
||||
Button {
|
||||
startLiveMessage(send: send, update: update)
|
||||
} label: {
|
||||
Label("Send live message", systemImage: "ellipsis.circle")
|
||||
}
|
||||
}
|
||||
} else {
|
||||
v
|
||||
}
|
||||
sendMessageButton()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,8 +116,8 @@ struct SendMessageView: View {
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
|
||||
private func sendMessageButton() -> some View {
|
||||
Button(action: sendMessage) {
|
||||
@ViewBuilder private func sendMessageButton() -> some View {
|
||||
let v = Button(action: sendMessage) {
|
||||
Image(systemName: composeState.editing || composeState.liveMessage != nil
|
||||
? "checkmark.circle.fill"
|
||||
: "arrow.up.circle.fill")
|
||||
@@ -146,7 +132,22 @@ struct SendMessageView: View {
|
||||
(!voiceMessageAllowed && composeState.voicePreview)
|
||||
)
|
||||
.frame(width: 29, height: 29)
|
||||
.padding([.bottom, .trailing], 4)
|
||||
|
||||
if composeState.liveMessage == nil,
|
||||
!composeState.voicePreview && !composeState.editing,
|
||||
let send = sendLiveMessage,
|
||||
let update = updateLiveMessage {
|
||||
v.contextMenu{
|
||||
Button {
|
||||
startLiveMessage(send: send, update: update)
|
||||
} label: {
|
||||
Label("Send live message", systemImage: "ellipsis.circle")
|
||||
}
|
||||
}
|
||||
.padding([.bottom, .trailing], 4)
|
||||
} else {
|
||||
v.padding([.bottom, .trailing], 4)
|
||||
}
|
||||
}
|
||||
|
||||
private struct RecordVoiceMessageButton: View {
|
||||
|
||||
Reference in New Issue
Block a user