-
Couldn't load subscription status.
- Fork 143
Description
Only because I'm stressing over trying to get #126 working again, I've noticed that posts can only get hidden or highlighted, not both. This used to work in Mayhem's version.
Say for example, I have a generic filter where posts with a GIF file are given the .file--gif class, so I can apply CSS to that post.
If a post matches a hiding filter, then the highlight filter is not applied, even after unhiding the stub.
Of course, if someone is hiding a post, they probably don't want it highlighted. But if they go to unhide the stub/post, and it was going to match a highlighting feature, I figure that should be there. And the default .filter-highlight class would not affect the stub. I guess inversely if a post is highlighted and then manually hidden, it should retain the knowledge it was highlighted.
From what I can tell, this is because Filter.coffee "forces" posts to be one or the other. Returning the whole Object at https://github.com/ccd0/4chan-x/blob/master/src/Filtering/Filter.coffee#L152 instead and not making https://github.com/ccd0/4chan-x/blob/master/src/Filtering/Filter.coffee#L165 an else seems to do the job. Though I can see catalog posts are treated different.
Still trying to use this commit as reference, but the structure of these files have changed a fair bit in the last decade. Mainly the introduction of the type: setting is stopping me from progressing, as I don't quite understand how to give the reason Post hidden due to the comment containing /x/i; or Post highlighted due to the flag being /Australia/i. Hopefully I can eventually work it out, unless someone else does.

