mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Fixes #2765 - Use the keyboard up arrow to edit the last message, use escape to cancel editing or replying.
This commit is contained in:
committed by
Stefan Ceriu
parent
3017100e5e
commit
e05e664f6d
@@ -161,12 +161,19 @@ struct ComposerToolbar: View {
|
||||
showResizeGrabber: context.viewState.bindings.composerActionsEnabled,
|
||||
isExpanded: $context.composerExpanded) {
|
||||
context.send(viewAction: .sendMessage)
|
||||
} editAction: {
|
||||
context.send(viewAction: .editLastMessage)
|
||||
} pasteAction: { provider in
|
||||
context.send(viewAction: .handlePasteOrDrop(provider: provider))
|
||||
} replyCancellationAction: {
|
||||
context.send(viewAction: .cancelReply)
|
||||
} editCancellationAction: {
|
||||
context.send(viewAction: .cancelEdit)
|
||||
} cancellationAction: {
|
||||
switch context.viewState.composerMode {
|
||||
case .edit:
|
||||
context.send(viewAction: .cancelEdit)
|
||||
case .reply:
|
||||
context.send(viewAction: .cancelReply)
|
||||
default:
|
||||
break
|
||||
}
|
||||
} onAppearAction: {
|
||||
context.send(viewAction: .composerAppeared)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user