mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user