mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Disable removing mention/command text trigger with RTE enabled
This commit is contained in:
@@ -8147,6 +8147,14 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
- (void)removeTriggerTextFromComposer:(NSString *)textTrigger
|
||||
{
|
||||
RoomInputToolbarView *toolbar = (RoomInputToolbarView *)self.inputToolbarView;
|
||||
Class roomInputToolbarViewClass = [RoomViewController mainToolbarClass];
|
||||
|
||||
// RTE handles removing the text trigger by itself.
|
||||
if (roomInputToolbarViewClass == WysiwygInputToolbarView.class && RiotSettings.shared.enableWysiwygTextFormatting)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (toolbar && textTrigger.length) {
|
||||
NSMutableAttributedString *attributedTextMessage = [[NSMutableAttributedString alloc] initWithAttributedString:toolbar.attributedTextMessage];
|
||||
[[attributedTextMessage mutableString] replaceOccurrencesOfString:textTrigger
|
||||
|
||||
Reference in New Issue
Block a user