Ignore keyboard input in "voice message mode" (#1988)

* Update rte to 2.15.0

* Ignore keyboard input when in voice message mode
This commit is contained in:
Alfonso Grillo 2023-10-31 12:47:10 +01:00 committed by GitHub
parent 87f772647b
commit b50b74b175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 6 deletions

View File

@ -6612,7 +6612,7 @@
repositoryURL = "https://github.com/matrix-org/matrix-wysiwyg-composer-swift";
requirement = {
kind = exactVersion;
version = 2.14.4;
version = 2.15.0;
};
};
96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = {

View File

@ -138,8 +138,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/matrix-org/matrix-wysiwyg-composer-swift",
"state" : {
"revision" : "e60d0ffa9fbb1368bd837c94dede2d8d48952c7f",
"version" : "2.14.4"
"revision" : "379ab4d0ff194eba197606c56345e5718b2e3810",
"version" : "2.15.0"
}
},
{
@ -262,7 +262,7 @@
{
"identity" : "swiftui-introspect",
"kind" : "remoteSourceControl",
"location" : "https://github.com/siteline/SwiftUI-Introspect",
"location" : "https://github.com/siteline/SwiftUI-Introspect.git",
"state" : {
"revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290",
"version" : "0.9.2"

View File

@ -53,7 +53,10 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
context.$viewState
.map(\.composerMode)
.removeDuplicates()
.sink { [weak self] in self?.actionsSubject.send(.composerModeChanged(mode: $0)) }
.sink { [weak self] in
self?.wysiwygViewModel.shouldReplaceText = $0.isTextEditingEnabled
self?.actionsSubject.send(.composerModeChanged(mode: $0))
}
.store(in: &cancellables)
context.$viewState

View File

@ -52,6 +52,15 @@ enum RoomScreenComposerMode: Equatable {
return false
}
}
var isTextEditingEnabled: Bool {
switch self {
case .default, .reply, .edit:
return true
case .recordVoiceMessage, .previewVoiceMessage:
return false
}
}
}
enum RoomScreenViewAction {

View File

@ -112,7 +112,7 @@ packages:
minorVersion: 2.0.0
WysiwygComposer:
url: https://github.com/matrix-org/matrix-wysiwyg-composer-swift
exactVersion: 2.14.4
exactVersion: 2.15.0
# path: ../matrix-wysiwyg/platforms/ios/lib/WysiwygComposer
SwiftOGG:
url: https://github.com/vector-im/swift-ogg