Skip to content

Commit

Permalink
kick/observer(fix): disappearing chat history (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatoleAM authored Jun 27, 2023
1 parent 9b9a7f6 commit 05d7035
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-nightly.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Fixed an issue with the EventAPI connection closing on the first initialization
- Fixed an issue that prevented new chatters from appearing in autocompletion
- Fixed an issue which squished tooltips when hovering an emote on the far right side of chat
- Fixed an issue which hid historical messages on Kick
- Increased the default value for Message Batching from 150 to 250

### Version 3.0.13.1000
Expand Down
6 changes: 3 additions & 3 deletions src/site/kick.com/modules/chat/ChatObserver.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const userCard = ref<ActiveUserCard[]>([]);
const refreshRate = useConfig<number>("chat.message_batch_duration", 100);
function patchMessageElement(el: HTMLDivElement): void {
function patchMessageElement(el: HTMLDivElement, noBuffer?: boolean): void {
if (!el.hasAttribute("data-chat-entry")) return; // not a message
const entryID = el.getAttribute("data-chat-entry")!;
Expand All @@ -62,7 +62,7 @@ function patchMessageElement(el: HTMLDivElement): void {
el,
};
el.classList.add("seventv-chat-message-buffered");
if (!noBuffer) el.classList.add("seventv-chat-message-buffered");
messageBuffer.value.push(bind);
messageMap.set(el, bind);
Expand Down Expand Up @@ -99,7 +99,7 @@ async function onOpenUserCard(bind: ChatMessageBinding) {
function patch(): void {
const entries = props.listElement.querySelectorAll("[data-chat-entry]");
for (const el of Array.from(entries)) {
patchMessageElement(el as HTMLDivElement);
patchMessageElement(el as HTMLDivElement, true);
}
}
Expand Down

0 comments on commit 05d7035

Please sign in to comment.