diff --git a/src/common/component/Message/Reaction.tsx b/src/common/component/Message/Reaction.tsx index 6dff3a7d..f93361b9 100644 --- a/src/common/component/Message/Reaction.tsx +++ b/src/common/component/Message/Reaction.tsx @@ -59,7 +59,7 @@ const Reaction: FC = ({ mid, reactions = null, readOnly = false }) => { if (!reactions || Object.entries(reactions).length == 0) return null; return ( - + {Object.entries(reactions).map(([reaction, uids], idx) => { const reacted = uids.findIndex((id: number) => id == currUid) > -1; return uids.length > 0 ? ( diff --git a/src/common/component/Message/index.tsx b/src/common/component/Message/index.tsx index a6599bd8..f12797c4 100644 --- a/src/common/component/Message/index.tsx +++ b/src/common/component/Message/index.tsx @@ -35,7 +35,7 @@ const Message: FC = ({ read = true }) => { const { visible: contextMenuVisible, handleContextMenuEvent, hideContextMenu } = useContextMenu(); - const inviewRef = useInView(); + const inViewRef = useInView(); const [edit, setEdit] = useState(false); const avatarRef = useRef(null); const { getPinInfo } = usePinMessage(context == "channel" ? contextId : 0); @@ -95,7 +95,7 @@ const Message: FC = ({ key={_key} onContextMenu={readOnly ? undefined : handleContextMenuEvent} data-msg-mid={mid} - ref={inviewRef} + ref={inViewRef} className={clsx(`group w-full relative flex items-start gap-2 md:gap-4 px-1 md:px-2 py-1 my-2 rounded-lg md:dark:hover:bg-gray-800 md:hover:bg-gray-100`, readOnly && "hover:bg-transparent", showExpire && "bg-red-200 dark:bg-red-200/40", @@ -146,7 +146,11 @@ const Message: FC = ({ -
+ {/* 文本类的消息限高 */} +
{reply_mid && } {edit ? ( @@ -164,8 +168,8 @@ const Message: FC = ({ edited }) )} - {reactions && }
+ {reactions && }