diff --git a/Cargo.toml b/Cargo.toml index e7f1901..729e22c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "libreddit" description = " Alternative private front-end to Reddit" license = "AGPL-3.0" repository = "https://github.com/spikecodes/libreddit" -version = "0.22.1" +version = "0.22.2" authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] edition = "2021" diff --git a/src/subreddit.rs b/src/subreddit.rs index 119ba65..dde8fb8 100644 --- a/src/subreddit.rs +++ b/src/subreddit.rs @@ -87,14 +87,12 @@ pub async fn community(req: Request) -> Result, 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()); diff --git a/templates/subreddit.html b/templates/subreddit.html index 764c63e..f569bb7 100644 --- a/templates/subreddit.html +++ b/templates/subreddit.html @@ -74,12 +74,12 @@ {% endif %} - {% if is_filtered || (!sub.name.is_empty() && !sub.name.contains("+")) %} + {% if is_filtered || (sub.name != "all" && sub.name != "popular" && !sub.name.contains("+")) %}