Fix sorting buttons on r/all and r/popular (#402)

* Fix sorting buttons on r/all and r/popular

* Bump version to v0.22.2

* Fix empty sidebar in r/all and r/popular

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
This commit is contained in:
Nick Lowery 2022-03-14 21:39:39 -06:00 committed by GitHub
parent 3eef60d486
commit f0a6bdc21b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 7 deletions

View file

@ -87,14 +87,12 @@ pub async fn community(req: Request<Body>) -> Result<Response<Body>, String> {
} else {
Subreddit::default()
}
} else if sub_name.contains('+') {
// Multireddit
} else {
// Multireddit, all, popular
Subreddit {
name: sub_name.clone(),
..Subreddit::default()
}
} else {
Subreddit::default()
};
let path = format!("/r/{}/{}.json?{}&raw_json=1", sub_name.clone(), sort, req.uri().query().unwrap_or_default());