feat: replace Embed.tsx with AttachmentRenderer + EmbedRenderer in Message
Switches Message.tsx from client-side URL metadata fetching (old Embed.tsx) to server-driven embed objects via message.embeds[]. Delegates attachment rendering to AttachmentRenderer. Removes firstUrl extraction and urlRegex.
This commit is contained in:
@@ -134,7 +134,7 @@ export function MessageList({ channelId, jumpToMessageId, onJumpComplete }: Mess
|
||||
if (el) {
|
||||
el.scrollIntoView({ block: 'start' });
|
||||
const dist = container.scrollHeight - container.scrollTop - container.clientHeight;
|
||||
const near = dist < 5000;
|
||||
const near = dist < 150;
|
||||
setIsNearBottom(near);
|
||||
isNearBottomRef.current = near;
|
||||
return;
|
||||
@@ -218,7 +218,7 @@ export function MessageList({ channelId, jumpToMessageId, onJumpComplete }: Mess
|
||||
|
||||
// Check if near bottom
|
||||
const distanceFromBottom = container.scrollHeight - container.scrollTop - container.clientHeight;
|
||||
const nearBottom = distanceFromBottom < 5000;
|
||||
const nearBottom = distanceFromBottom < 150;
|
||||
setIsNearBottom(nearBottom);
|
||||
isNearBottomRef.current = nearBottom;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user