From da858797d3acfd1af5eab6ee9188ee0f346b8e2d Mon Sep 17 00:00:00 2001 From: CJ <38697367+imisshtml@users.noreply.github.com> Date: Tue, 3 Dec 2019 13:07:34 -0500 Subject: [PATCH] MM-19837 Remove Opacity from AtMention Markdown (#3640) * MM-19837 Remove Opacity from AtMention Markdown Removed the opacity that was set on the base text style for the markdown on AtMention for system messages. * MM-19837 Updated opacity for AtMention The baseTextStyle being used to set the opacity is used across the entire text format, so for this change where an AtMention is used, I added a new opacity to overwrite the on applied by the baseTextStyle. --- app/components/formatted_markdown_text.js | 7 ++++++- app/components/markdown/markdown.js | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/components/formatted_markdown_text.js b/app/components/formatted_markdown_text.js index 2f5b03fc2..01898d9af 100644 --- a/app/components/formatted_markdown_text.js +++ b/app/components/formatted_markdown_text.js @@ -110,12 +110,14 @@ class FormattedMarkdownText extends React.PureComponent { } renderAtMention = ({context, mentionName}) => { + const style = getStyleSheet(this.props.theme); + return ( ); } @@ -139,6 +141,9 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { fontSize: 15, lineHeight: 22, }, + atMentionOpacity: { + opacity: 1, + }, }; }); diff --git a/app/components/markdown/markdown.js b/app/components/markdown/markdown.js index 93edb1296..8de3f7260 100644 --- a/app/components/markdown/markdown.js +++ b/app/components/markdown/markdown.js @@ -199,10 +199,12 @@ export default class Markdown extends PureComponent { return this.renderText({context, literal: `@${mentionName}`}); } + const style = getStyleSheet(this.props.theme); + return ( { color: editedColor, opacity: editedOpacity, }, + atMentionOpacity: { + opacity: 1, + }, }; });