Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mutual Checker: Only-mutuals option may be unreliable #1209

Open
marcustyphoon opened this issue Aug 16, 2023 · 0 comments
Open

Mutual Checker: Only-mutuals option may be unreliable #1209

marcustyphoon opened this issue Aug 16, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@marcustyphoon
Copy link
Collaborator

Platform

MacOS 13.5 arm64

Browser

Chrome

Addon version

master

Details

This else if statement is preceded by a bunch of early returns. If one of those early returns triggers, the else block will never occur. Mutual Checker thus doesn't hide posts from blogs you aren't following.

const processPosts = function (postElements) {
  filterPostElements(postElements, { includeFiltered: true }).forEach(async postElement => {
    if (alreadyProcessed(postElement)) return;

    /* ... */

    if (!followingBlog) { return; }

    /* ... */
 
    if (isMutual) {
      postElement.classList.add(mutualsClass);
      postAttribution.prepend(createIcon(blogName));
    } else if (showOnlyMutuals) {
      postElement.classList.add(hiddenClass);
    }
  });
};
@marcustyphoon marcustyphoon added the bug Something isn't working label Aug 16, 2023
@AprilSylph AprilSylph added the help wanted Extra attention is needed label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants