Fix dictation when using the Rich Text Editor. (#7752)

This commit is contained in:
Doug
2024-02-14 15:19:33 +00:00
committed by GitHub
parent 0b130a512e
commit 467a754398
5 changed files with 14 additions and 15 deletions

View File

@@ -50,8 +50,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/matrix-org/matrix-wysiwyg-composer-swift",
"state" : {
"revision" : "0aa1308c43451fd077e332f72d6a32135f258834",
"version" : "2.19.0"
"revision" : "f788fe2482c0b89019f679a1f43dccf9c25a0782",
"version" : "2.29.0"
}
},
{

View File

@@ -9599,7 +9599,7 @@ public class VectorL10n: NSObject {
public static var wysiwygComposerFormatActionQuote: String {
return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_quote")
}
/// Apply underline format
/// Apply strikethrough format
public static var wysiwygComposerFormatActionStrikethrough: String {
return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_strikethrough")
}
@@ -9607,7 +9607,7 @@ public class VectorL10n: NSObject {
public static var wysiwygComposerFormatActionUnIndent: String {
return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_un_indent")
}
/// Apply strikethrough format
/// Apply underline format
public static var wysiwygComposerFormatActionUnderline: String {
return VectorL10n.tr("Vector", "wysiwyg_composer_format_action_underline")
}

View File

@@ -137,7 +137,7 @@ struct Composer: View {
placeholder: viewModel.viewState.placeholder ?? "",
viewModel: wysiwygViewModel,
itemProviderHelper: nil,
keyCommandHandler: handleKeyCommand,
keyCommands: keyCommands,
pasteHandler: nil
)
.clipped()
@@ -228,15 +228,13 @@ struct Composer: View {
}
}
func handleKeyCommand(_ keyCommand: WysiwygKeyCommand) -> Bool {
switch keyCommand {
case .enter:
sendMessageAction(wysiwygViewModel.content)
wysiwygViewModel.clearContent()
return true
case .shiftEnter:
return false
}
var keyCommands: [WysiwygKeyCommand] {
[
.enter {
sendMessageAction(wysiwygViewModel.content)
wysiwygViewModel.clearContent()
}
]
}
/// Computes the total height of the composer (excluding the RTE formatting bar).

1
changelog.d/7752.bugfix Normal file
View File

@@ -0,0 +1 @@
Fix dictation when using the Rich Text Editor

View File

@@ -59,7 +59,7 @@ packages:
branch: 0.0.1
WysiwygComposer:
url: https://github.com/matrix-org/matrix-wysiwyg-composer-swift
version: 2.19.0
version: 2.29.0
DeviceKit:
url: https://github.com/devicekit/DeviceKit
majorVersion: 4.7.0