Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3504914
D6505.id21800.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D6505.id21800.diff
View Options
diff --git a/native/chat/inner-robotext-message.react.js b/native/chat/inner-robotext-message.react.js
--- a/native/chat/inner-robotext-message.react.js
+++ b/native/chat/inner-robotext-message.react.js
@@ -51,9 +51,9 @@
if (splitPart === '') {
continue;
}
+ const key = `text${keyIndex++}`;
if (splitPart.charAt(0) !== '<') {
const darkColor = activeTheme === 'dark';
- const key = `text${keyIndex++}`;
result.push(
<Markdown
style={styles.robotext}
@@ -69,9 +69,9 @@
const { rawText, entityType, id } = parseRobotextEntity(splitPart);
if (entityType === 't' && id !== threadID) {
- result.push(<ThreadEntity key={id} id={id} name={rawText} />);
+ result.push(<ThreadEntity key={key} id={id} name={rawText} />);
} else if (entityType === 'c') {
- result.push(<ColorEntity key={id} color={rawText} />);
+ result.push(<ColorEntity key={key} color={rawText} />);
} else {
result.push(rawText);
}
diff --git a/web/chat/robotext-message.react.js b/web/chat/robotext-message.react.js
--- a/web/chat/robotext-message.react.js
+++ b/web/chat/robotext-message.react.js
@@ -77,8 +77,8 @@
if (splitPart === '') {
continue;
}
+ const key = `text${keyIndex++}`;
if (splitPart.charAt(0) !== '<') {
- const key = `text${keyIndex++}`;
textParts.push(
<Markdown key={key} rules={linkRules(false)}>
{decodeURI(splitPart)}
@@ -90,9 +90,9 @@
const { rawText, entityType, id } = parseRobotextEntity(splitPart);
if (entityType === 't' && id !== item.messageInfo.threadID) {
- textParts.push(<ThreadEntity key={id} id={id} name={rawText} />);
+ textParts.push(<ThreadEntity key={key} id={id} name={rawText} />);
} else if (entityType === 'c') {
- textParts.push(<ColorEntity key={id} color={rawText} />);
+ textParts.push(<ColorEntity key={key} color={rawText} />);
} else {
textParts.push(rawText);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 11:11 AM (20 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2686573
Default Alt Text
D6505.id21800.diff (2 KB)
Attached To
Mode
D6505: [web][native] Always generate key from keyIndex in RobotextMessage
Attached
Detach File
Event Timeline
Log In to Comment