|
|
|
@ -180,20 +180,20 @@ export const ChatDisplay: Component<ChatDisplayProps> = (props) => {
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Suspense>
|
|
|
|
|
<For each={chatLog().messages}>
|
|
|
|
|
{(item: ChatMessageData, index: Accessor<number>) => {
|
|
|
|
|
const chatCommand = item.message.command;
|
|
|
|
|
<Index each={chatLog().messages}>
|
|
|
|
|
{(item: Accessor<ChatMessageData>, index: number) => {
|
|
|
|
|
const chatCommand = item().message.command;
|
|
|
|
|
if (chatCommand === "PRIVMSG") {
|
|
|
|
|
return (
|
|
|
|
|
<ChatMessage chatMessage={item} chatLog={chatLog()} videoTime={props.videoTime} />
|
|
|
|
|
<ChatMessage chatMessage={item()} chatLog={chatLog()} videoTime={props.videoTime} />
|
|
|
|
|
);
|
|
|
|
|
} else if (chatCommand === "USERNOTICE") {
|
|
|
|
|
return <SystemMessage chatMessage={item} videoTime={props.videoTime} />;
|
|
|
|
|
return <SystemMessage chatMessage={item()} videoTime={props.videoTime} />;
|
|
|
|
|
} else {
|
|
|
|
|
return <></>;
|
|
|
|
|
}
|
|
|
|
|
}}
|
|
|
|
|
</For>
|
|
|
|
|
</Index>
|
|
|
|
|
</Suspense>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
@ -378,13 +378,14 @@ const MessageText: Component<MessageTextProps> = (props) => {
|
|
|
|
|
emoteData.start - messageTextStart,
|
|
|
|
|
emoteData.end + 1 - messageTextStart,
|
|
|
|
|
);
|
|
|
|
|
chatMessageText = chatMessageText.substring(emoteData.end + 1 - messageTextStart);
|
|
|
|
|
chatMessageText = chatMessageText.substring(emoteData.end + 1);
|
|
|
|
|
messageTextStart = emoteData.end + 1;
|
|
|
|
|
messageParts.push(
|
|
|
|
|
<img
|
|
|
|
|
src={emoteImageURL}
|
|
|
|
|
alt={emoteText}
|
|
|
|
|
title={emoteText}
|
|
|
|
|
class={styles.chatReplayMessageEmote}
|
|
|
|
|
/>,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|