Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix closing quote in liked message previews

Anand Baburajane1b80f19e54a
diff --git a/web/apps/space/src/screens/MessagesScreen.tsx b/web/apps/space/src/screens/MessagesScreen.tsx
index a689af6a2e..bd242a3121 100644
--- a/web/apps/space/src/screens/MessagesScreen.tsx
+++ b/web/apps/space/src/screens/MessagesScreen.tsx
@@ -222,6 +222,7 @@ const conversationPreview = (conversation: SpaceMessageConversation) => {
const ConversationPreviewLine: React.FC<{
conversation: SpaceMessageConversation;
}> = ({ conversation }) => {
+ const activity = conversation.latestActivity;
const previewLineSx = {
color: textSecondary,
fontFamily: '"Inter Variable", Inter, sans-serif',
@@ -234,6 +235,29 @@ const ConversationPreviewLine: React.FC<{
whiteSpace: "nowrap",
};
+ if (activity.type == "message_like" && activity.text) {
+ return (
+ <Box sx={{ ...previewLineSx, display: "flex" }}>
+ <Box component="span" sx={{ flexShrink: 0 }}>
+ {activity.outgoing ? 'You liked "' : 'Liked "'}
+ </Box>
+ <Box
+ component="span"
+ sx={{
+ minWidth: 0,
+ overflow: "hidden",
+ textOverflow: "ellipsis",
+ }}
+ >
+ {truncateMessageText(activity.text)}
+ </Box>
+ <Box component="span" sx={{ flexShrink: 0 }}>
+ &quot;
+ </Box>
+ </Box>
+ );
+ }
+
return <Box sx={previewLineSx}>{conversationPreview(conversation)}</Box>;
};