libreddit
libreddit copied to clipboard
Implement "posts hidden because of NSFW"
Fixes #159
I like the idea of this but it seems to show up in pretty much ever feed under this current implementation, including r/popular:

It might be best to curtail this to only NSFW subreddits where no content is viewable without enabling NSFW.
Makes sense! I'll make the change so that it becomes "all" posts hidden by NSFW rather than any.
Unfortunately I can't find the API response that determines whether a sub is NSFW as a whole or if just a few posts are. Nonetheless the situation where a sub has a few non-NSFW posts and the rest would be hidden is probably an edge case (if a sub is marked NSFW every post is IIRC).
Fixed logic to cover only when all posts are NSFW and user has disabled NSFW.
@sigaloid: I'm going to close this in favor of the code you submitted to Ferrit, which is now available in a separate branch all-posts-hidden-nsfw. I'll open up a PR for that shortly.