From f0e1931d3238e7c17707ba930d764b809c51e4fa Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Wed, 18 Dec 2019 19:10:08 +0100 Subject: [PATCH] Automated cherry pick of #3640 (#3725) * 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, + }, }; });