Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32167739
D5048.1765053739.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D5048.1765053739.diff
View Options
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
@@ -70,7 +70,6 @@
const boundColors = useColors();
const messageStyle = {};
- const textStyle = {};
let darkColor;
if (isViewer) {
const threadColor = item.threadInfo.color;
@@ -81,9 +80,6 @@
messageStyle.backgroundColor = boundColors.listChatBubble;
darkColor = activeTheme === 'dark';
}
- textStyle.color = darkColor
- ? colors.dark.listForegroundLabel
- : colors.light.listForegroundLabel;
const cornerStyle = getRoundedContainerStyle(filterCorners(allCorners, item));
@@ -95,6 +91,16 @@
const rules = useTextMessageMarkdownRules(darkColor);
+ const markdownStyles = React.useMemo(() => {
+ const textStyle = {
+ color: darkColor
+ ? colors.dark.listForegroundLabel
+ : colors.light.listForegroundLabel,
+ };
+
+ return [styles.text, textStyle];
+ }, [darkColor]);
+
const message = (
<TouchableWithoutFeedback>
<View>
@@ -105,7 +111,7 @@
style={[styles.message, cornerStyle]}
animatedStyle={messageStyle}
>
- <Markdown style={[styles.text, textStyle]} rules={rules}>
+ <Markdown style={markdownStyles} rules={rules}>
{text}
</Markdown>
</GestureTouchableOpacity>
diff --git a/native/markdown/rules.react.js b/native/markdown/rules.react.js
--- a/native/markdown/rules.react.js
+++ b/native/markdown/rules.react.js
@@ -224,11 +224,19 @@
node: SharedMarkdown.SingleASTNode,
output: SharedMarkdown.Output<SharedMarkdown.ReactElement>,
state: SharedMarkdown.State,
- ) => (
- <View key={state.key} style={styles.blockQuote}>
- {output(node.content, state)}
- </View>
- ),
+ ) => {
+ const { isNestedQuote } = state;
+ const backgroundColor = isNestedQuote ? '#00000000' : '#00000066';
+
+ return (
+ <View
+ key={state.key}
+ style={[styles.blockQuote, { backgroundColor }]}
+ >
+ {output(node.content, { ...state, isNestedQuote: true })}
+ </View>
+ );
+ },
},
codeBlock: {
...SimpleMarkdown.defaultRules.codeBlock,
diff --git a/native/markdown/styles.js b/native/markdown/styles.js
--- a/native/markdown/styles.js
+++ b/native/markdown/styles.js
@@ -60,9 +60,9 @@
fontWeight: 'bold',
},
blockQuote: {
- backgroundColor: 'blockQuoteBackground',
- borderLeftColor: 'blockQuoteBorder',
- borderLeftWidth: 5,
+ borderLeftColor: '#00000066',
+ borderLeftWidth: 8,
+ borderRadius: 8,
padding: 10,
marginBottom: 6,
marginVertical: 6,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 8:42 PM (13 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5840721
Default Alt Text
D5048.1765053739.diff (2 KB)
Attached To
Mode
D5048: [native] Implement darker color tint to block quote container
Attached
Detach File
Event Timeline
Log In to Comment