From 77b072433b7a05c2d1bcaa8e05e469e7ee16124f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9ctor=20Javier=20Amigo?=
<111904856+eldoctormail@users.noreply.github.com>
Date: Fri, 12 Jun 2026 07:28:40 -0300
Subject: [PATCH 1/2] Refactor comment rendering to use Text components
---
mobile/components/CommentItem.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mobile/components/CommentItem.tsx b/mobile/components/CommentItem.tsx
index 6b7ff27c6..bb25ec53e 100644
--- a/mobile/components/CommentItem.tsx
+++ b/mobile/components/CommentItem.tsx
@@ -134,7 +134,7 @@ export default function CommentItem({
while ((match = mentionRegex.exec(content)) !== null) {
if (match.index > lastIndex) {
- parts.push(content.slice(lastIndex, match.index));
+ parts.push({content.slice(lastIndex, match.index)});
}
const [, displayName, userId] = match;
parts.push(
@@ -155,7 +155,7 @@ export default function CommentItem({
parts.push(content.slice(lastIndex));
}
- return parts.length > 0 ? parts : content;
+ return parts.length > 0 ? {parts} : {content};
};
return (
From c198298bdb88edd854f7f248c23c5a5ce625a4d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?H=C3=A9ctor=20Javier=20Amigo?=
<111904856+eldoctormail@users.noreply.github.com>
Date: Fri, 12 Jun 2026 07:33:36 -0300
Subject: [PATCH 2/2] Fix key assignment for dynamic Text components
---
mobile/components/CommentItem.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/mobile/components/CommentItem.tsx b/mobile/components/CommentItem.tsx
index bb25ec53e..8c10aa623 100644
--- a/mobile/components/CommentItem.tsx
+++ b/mobile/components/CommentItem.tsx
@@ -131,6 +131,7 @@ export default function CommentItem({
const parts: ReactNode[] = [];
let lastIndex = 0;
let match;
+ let key = 0;
while ((match = mentionRegex.exec(content)) !== null) {
if (match.index > lastIndex) {
@@ -152,7 +153,7 @@ export default function CommentItem({
}
if (lastIndex < content.length) {
- parts.push(content.slice(lastIndex));
+ parts.push({content.slice(lastIndex)});
}
return parts.length > 0 ? {parts} : {content};