mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 02:22:44 +02:00
implementation done, only tests, localisation and design feedback are left
This commit is contained in:
@@ -227,6 +227,7 @@ struct Composer: View {
|
||||
sendMediaButton
|
||||
FormattingToolbar(formatItems: formatItems) { type in
|
||||
if type.action == .link {
|
||||
storeCurrentSelection()
|
||||
sendLinkAction()
|
||||
} else {
|
||||
wysiwygViewModel.apply(type.action)
|
||||
@@ -247,6 +248,10 @@ struct Composer: View {
|
||||
}
|
||||
}
|
||||
|
||||
private func storeCurrentSelection() {
|
||||
viewModel.send(viewAction: .storeSelection(selection: wysiwygViewModel.attributedContent.selection))
|
||||
}
|
||||
|
||||
private func sendLinkAction() {
|
||||
let linkAction = wysiwygViewModel.getLinkAction()
|
||||
viewModel.send(viewAction: .linkTapped(linkAction: linkAction))
|
||||
|
||||
Reference in New Issue
Block a user