diff --git a/source/browser/conversation-list.ts b/source/browser/conversation-list.ts index bfc7dbb68..d6a9f4217 100644 --- a/source/browser/conversation-list.ts +++ b/source/browser/conversation-list.ts @@ -188,6 +188,7 @@ function genStringFromNode(element: Element): string { } function countUnread(mutationsList: MutationRecord[]): void { + console.error(mutationsList); const alreadyChecked: any = []; // Look through the mutations for the one with the unread dot const unreadMutations = mutationsList.filter(mutation => @@ -195,8 +196,7 @@ function countUnread(mutationsList: MutationRecord[]): void { ( mutation.type === 'characterData' // Make sure the text corresponds to a conversation - && mutation.target.parentElement?.className === 'x1lliihq x193iq5w x6ikm8r x10wlt62 xlyipyv xuxw1ft' - && mutation.target.parentElement?.parentElement?.parentElement?.className === 'x6s0dn4 x78zum5 x193iq5w xeuugli xg83lxy' + && mutation.target.parentElement?.parentElement?.parentElement?.className === 'html-span xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x18d9i69 xkhd6sd x1hl2dhg x16tdsg8 x1vvkbs x6s0dn4 x78zum5 x193iq5w xeuugli xg83lxy' ) // When an emoji is received, node(s) are added || ( @@ -205,8 +205,7 @@ function countUnread(mutationsList: MutationRecord[]): void { // By using this condition we ensure that this is the mutation where nodes are added && mutation.addedNodes.length > 0 // Make sure the mutation corresponds to a conversation - && (mutation.target as Element).className === 'x1lliihq x193iq5w x6ikm8r x10wlt62 xlyipyv xuxw1ft' - && mutation.target.parentElement?.parentElement?.className === 'x6s0dn4 x78zum5 x193iq5w xeuugli xg83lxy' + && mutation.target.parentElement?.parentElement?.className === 'html-span xdj266r x11i5rnm xat24cr x1mh8g0r xexx8yu x18d9i69 xkhd6sd x1hl2dhg x16tdsg8 x1vvkbs x6s0dn4 x78zum5 x193iq5w xeuugli xg83lxy' )); // Check latest mutation first