From 31290f3377465b95aa46cf3a0025b40635325d55 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 17 Jul 2017 14:27:50 +0100 Subject: [PATCH] Remove redundant, unused decorators from RTE These have since been replaced by decorators that operator whether in MD mode or otherwise. This might not be optimal because LINK entities do not appear in MD mode at all at the moment, but instead you see the ()[] md notation version. --- src/RichText.js | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/src/RichText.js b/src/RichText.js index f2f2d533a8..3cd0f5ec59 100644 --- a/src/RichText.js +++ b/src/RichText.js @@ -113,31 +113,6 @@ let emojiDecorator = { * Returns a composite decorator which has access to provided scope. */ export function getScopedRTDecorators(scope: any): CompositeDecorator { - let MemberAvatar = sdk.getComponent('avatars.MemberAvatar'); - - let usernameDecorator = { - strategy: (contentBlock, callback) => { - findWithRegex(USERNAME_REGEX, contentBlock, callback); - }, - component: (props) => { - let member = scope.room.getMember(props.children[0].props.text); - // unused until we make these decorators immutable (autocomplete needed) - let name = member ? member.name : null; - let avatar = member ? : null; - return {avatar}{props.children}; - } - }; - - let roomDecorator = { - strategy: (contentBlock, callback) => { - findWithRegex(ROOM_REGEX, contentBlock, callback); - }, - component: (props) => { - return {props.children}; - } - }; - - // TODO Re-enable usernameDecorator and roomDecorator return [emojiDecorator]; }