Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Client: Hide deleted posts #1033

Merged
merged 4 commits into from
Apr 19, 2019
Merged

Client: Hide deleted posts #1033

merged 4 commits into from
Apr 19, 2019

Conversation

Kamuso
Copy link
Contributor

@Kamuso Kamuso commented Apr 13, 2019

Mostly completed feature. Doesn't work on page load, because posts is empty, in hideBinned(). I don't know what to change to get around this.

Mostly completed feature
@Kamuso
Copy link
Contributor Author

Kamuso commented Apr 13, 2019

Oh, closes #1026

@bakape
Copy link
Owner

bakape commented Apr 15, 2019

You should not be adding the hidden class on your own. Insead better integrate with the existing post hiding logic.

Add the post to the hidden set here to hide on page load: https://github.com/bakape/meguca/blob/master/client/page/common.ts#L141
Add a check on model creation here to hide any new posts: https://github.com/bakape/meguca/blob/master/client/posts/model.ts#L51
To hide posts on fresh deletes: https://github.com/bakape/meguca/blob/master/client/posts/model.ts#L214
You will also need to loop over the post collection and hide all already deleted posts, when the option is toggled on in options/loop.ts.

Ask, if you have any questions. I can explain some more specific things about the higher level architecture, if they are unclear.

@Kamuso
Copy link
Contributor Author

Kamuso commented Apr 17, 2019

You should not be adding the hidden class on your own. Insead better integrate with the existing post hiding logic.

Okay. I kept them separate to easily unhide on toggle, but it's not like that was important.

This time I've tried to keep behaviour as similar to how recursive hiding currently works, in regards to unhiding, new post tab icons, and hidden post count.

Copy link
Owner

@bakape bakape left a comment

Choose a reason for hiding this comment

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

Looks good.

@bakape bakape merged commit 092343b into bakape:master Apr 19, 2019
@Kamuso Kamuso deleted the dev/hide-bins branch April 19, 2019 19:04
nekto-nekto pushed a commit to 0-chan-ru/tetuca that referenced this pull request May 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants