Skip to content

Commit

Permalink
update class names
Browse files Browse the repository at this point in the history
  • Loading branch information
stkrknds committed Sep 16, 2023
1 parent e5e1358 commit 00142e9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/browser/conversation-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,15 @@ function genStringFromNode(element: Element): string {
}

function countUnread(mutationsList: MutationRecord[]): void {
console.error(mutationsList);

Check failure on line 191 in source/browser/conversation-list.ts

View workflow job for this annotation

GitHub Actions / tests

Expected indentation of 1 tab but found 2.
const alreadyChecked: any = [];
// Look through the mutations for the one with the unread dot
const unreadMutations = mutationsList.filter(mutation =>
// When text is received
(
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
|| (
Expand All @@ -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
Expand Down

0 comments on commit 00142e9

Please sign in to comment.