mirror of
https://github.com/spikecodes/libreddit.git
synced 2025-12-23 22:12:36 +01:00
Filter subreddits and users (#317)
* Initial work on filtering subreddits and users * Fix doubly-prefixed subreddit name in search alt text (e.g. r/r/pics) * Don't set post title to "Comment" if empty - this could throw off actual posts with the title "Comment" * Filter search results * Fix filtering to differentiate between "this subject itself is filtered" vs "all posts on this current page have been filtered" * Remove unnecessary check * Clean up * Cargo format * Collapse comments from filtered users Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
This commit is contained in:
@@ -109,7 +109,7 @@ fn set_cookies_method(req: Request<Body>, remove_cookies: bool) -> Response<Body
|
||||
|
||||
let mut response = redirect(path);
|
||||
|
||||
for name in [PREFS.to_vec(), vec!["subscriptions"]].concat() {
|
||||
for name in [PREFS.to_vec(), vec!["subscriptions", "filters"]].concat() {
|
||||
match form.get(name) {
|
||||
Some(value) => response.insert_cookie(
|
||||
Cookie::build(name.to_owned(), value.clone())
|
||||
|
||||
Reference in New Issue
Block a user