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