mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 06:58:28 +02:00
Merge branch 'feature/4955_disable_wysiwyg_commands' into 'develop'
MESSENGER 4955 disable WYSIWYG commands See merge request bwmessenger/bundesmessenger/bundesmessenger-ios!206
This commit is contained in:
@@ -659,6 +659,7 @@ class BWIBuildSettings: NSObject {
|
||||
|
||||
// MARK: WYSIWYG
|
||||
var enableFeatureWYSIWYGByDefault = true
|
||||
var enableWYSIWYGCommands = false
|
||||
|
||||
// MARK: itunes
|
||||
var itunesAppLink = ""
|
||||
|
||||
@@ -379,7 +379,8 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
|
||||
}
|
||||
|
||||
private func sendWysiwygMessage(content: WysiwygComposerContent) {
|
||||
if content.markdown.prefix(while: { $0 == "/" }).count == 1 {
|
||||
// bwi: #4955 disable WYSIWYG commands
|
||||
if BWIBuildSettings.shared.enableWYSIWYGCommands && content.markdown.prefix(while: { $0 == "/" }).count == 1 {
|
||||
let commandText: String
|
||||
if content.markdown.hasPrefix(MXKSlashCommand.emote.cmd) {
|
||||
// `/me` command works with markdown content
|
||||
|
||||
@@ -128,7 +128,12 @@ class CompletionSuggestionService: CompletionSuggestionServiceProtocol {
|
||||
items.send([])
|
||||
currentTextTriggerSubject.send(nil)
|
||||
case .slash:
|
||||
currentTextTriggerSubject.send(TextTrigger(key: .slash, text: suggestionPattern.text))
|
||||
// bwi: #4955 disable WYSIWYG commands
|
||||
if BWIBuildSettings.shared.enableWYSIWYGCommands {
|
||||
currentTextTriggerSubject.send(TextTrigger(key: .slash, text: suggestionPattern.text))
|
||||
} else {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user