Page MenuHomePhabricator

D5049.diff
No OneTemporary

D5049.diff

diff --git a/native/chat/inner-text-message.react.js b/native/chat/inner-text-message.react.js
--- a/native/chat/inner-text-message.react.js
+++ b/native/chat/inner-text-message.react.js
@@ -118,6 +118,7 @@
style={markdownStyles}
rules={rules}
threadColor={item.threadInfo.color}
+ isViewer={isViewer}
>
{text}
</Markdown>
diff --git a/native/markdown/markdown.react.js b/native/markdown/markdown.react.js
--- a/native/markdown/markdown.react.js
+++ b/native/markdown/markdown.react.js
@@ -18,9 +18,10 @@
+children: string,
+rules: MarkdownRules,
+threadColor?: string,
+ +isViewer?: boolean,
};
function Markdown(props: Props): React.Node {
- const { style, children, rules, threadColor } = props;
+ const { style, children, rules, threadColor, isViewer } = props;
const { simpleMarkdownRules, emojiOnlyFactor, container } = rules;
const boundColors = useColors();
@@ -69,7 +70,9 @@
const renderedOutput = React.useMemo(() => {
let color = boundColors.listChatBubble;
if (threadColor) {
- color = tinycolor(threadColor).darken(20).toString();
+ color = isViewer
+ ? tinycolor(threadColor).darken(20).toString()
+ : tinycolor(threadColor).toString();
}
return output(ast, { textStyle, container, color });
}, [
@@ -79,6 +82,7 @@
container,
threadColor,
boundColors.listChatBubble,
+ isViewer,
]);
if (container === 'Text') {

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 22, 1:17 AM (17 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2559290
Default Alt Text
D5049.diff (1 KB)

Event Timeline