From 9eb42932df6f7067f375c2d07bdcb8fd0eca1d06 Mon Sep 17 00:00:00 2001 From: spikecodes <19519553+spikecodes@users.noreply.github.com> Date: Thu, 24 Mar 2022 21:19:21 -0700 Subject: [PATCH 1/4] Hide empty sidebar --- Cargo.lock | 2 +- Cargo.toml | 2 +- templates/subreddit.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a0b9bdc..88f6755 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -540,7 +540,7 @@ checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" [[package]] name = "libreddit" -version = "0.22.1" +version = "0.22.3" dependencies = [ "askama", "async-recursion", diff --git a/Cargo.toml b/Cargo.toml index 729e22c..4a86427 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.2" +version = "0.22.3" authors = ["spikecodes <19519553+spikecodes@users.noreply.github.com>"] edition = "2021" diff --git a/templates/subreddit.html b/templates/subreddit.html index f569bb7..61f78db 100644 --- a/templates/subreddit.html +++ b/templates/subreddit.html @@ -74,12 +74,12 @@ {% endif %} - {% if is_filtered || (sub.name != "all" && sub.name != "popular" && !sub.name.contains("+")) %} + {% if is_filtered || (!sub.name.is_empty() && sub.name != "all" && sub.name != "popular" && !sub.name.contains("+")) %}