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

Improve mute #553

Merged
merged 4 commits into from
Jan 30, 2025
Merged

Improve mute #553

merged 4 commits into from
Jan 30, 2025

Conversation

ticruz38
Copy link
Collaborator

@ticruz38 ticruz38 commented Jan 28, 2025

#498

Allow users to hide the "show x hidden replies" bit for muted notes

There is a new settings called "load_muted_replies", on by default, if turned off, it will hide the button

Don't mute notes by the user's own pubkey

The only way to mute a note of your own is either to mute your own npub or that specific event id. If a word is muted and your note contain this word, it won't be hidden.

Hide muted parents in feeds (sometimes a reply to a muted note will show up, just remove it and its parent if the parent is muted)

This one is the most challenging. It should be done in the new NoteReducer.
The NoteReducer currently look for a parent at a depth of 2. If it turns out that the parent at the depth 3 is muted, we won't catch it.
The solution is obviously to loop until no parent is found just to check if one event in the chain is being muted, in which case all downstream event should be hidden. It might have a small performance footprint.

Awaiting your feedback on that last point to implement the needed changes

@staab
Copy link
Collaborator

staab commented Jan 29, 2025

If it turns out that the parent at the depth 3 is muted, we won't catch it.

That's ok, we don't have to get too crazy, we should just avoid showing immediate descendants of muted notes if we know we've muted the parent. Deep descendants should still be fair game.

Comment on lines 69 to 72
<FieldInline label="Load muted replies">
<Toggle bind:value={values.load_muted_replies} />
<p slot="info">If enabled, muted replies will be loaded.</p>
</FieldInline>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put this underneath mute words and call it "Ignore muted content"

src/engine/state.ts Outdated Show resolved Hide resolved
@staab staab merged commit 4d27d44 into coracle-social:dev Jan 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants