Page MenuHomePhabricator

D6505.id21800.diff
No OneTemporary

D6505.id21800.diff

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

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)

Event Timeline