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
5 changed files with 18 additions and 6 deletions
+1 -1
View File
@@ -6612,7 +6612,7 @@
repositoryURL = "https://github.com/matrix-org/matrix-wysiwyg-composer-swift"; repositoryURL = "https://github.com/matrix-org/matrix-wysiwyg-composer-swift";
requirement = { requirement = {
kind = exactVersion; kind = exactVersion;
version = 2.14.4; version = 2.15.0;
}; };
}; };
96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = { 96495DD8554E2F39D3954354 /* XCRemoteSwiftPackageReference "posthog-ios" */ = {
@@ -138,8 +138,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/matrix-org/matrix-wysiwyg-composer-swift", "location" : "https://github.com/matrix-org/matrix-wysiwyg-composer-swift",
"state" : { "state" : {
"revision" : "e60d0ffa9fbb1368bd837c94dede2d8d48952c7f", "revision" : "379ab4d0ff194eba197606c56345e5718b2e3810",
"version" : "2.14.4" "version" : "2.15.0"
} }
}, },
{ {
@@ -262,7 +262,7 @@
{ {
"identity" : "swiftui-introspect", "identity" : "swiftui-introspect",
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/siteline/SwiftUI-Introspect", "location" : "https://github.com/siteline/SwiftUI-Introspect.git",
"state" : { "state" : {
"revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290", "revision" : "b94da693e57eaf79d16464b8b7c90d09cba4e290",
"version" : "0.9.2" "version" : "0.9.2"
@@ -53,7 +53,10 @@ final class ComposerToolbarViewModel: ComposerToolbarViewModelType, ComposerTool
context.$viewState context.$viewState
.map(\.composerMode) .map(\.composerMode)
.removeDuplicates() .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) .store(in: &cancellables)
context.$viewState context.$viewState
@@ -52,6 +52,15 @@ enum RoomScreenComposerMode: Equatable {
return false return false
} }
} }
var isTextEditingEnabled: Bool {
switch self {
case .default, .reply, .edit:
return true
case .recordVoiceMessage, .previewVoiceMessage:
return false
}
}
} }
enum RoomScreenViewAction { enum RoomScreenViewAction {
+1 -1
View File
@@ -112,7 +112,7 @@ packages:
minorVersion: 2.0.0 minorVersion: 2.0.0
WysiwygComposer: WysiwygComposer:
url: https://github.com/matrix-org/matrix-wysiwyg-composer-swift 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 # path: ../matrix-wysiwyg/platforms/ios/lib/WysiwygComposer
SwiftOGG: SwiftOGG:
url: https://github.com/vector-im/swift-ogg url: https://github.com/vector-im/swift-ogg