diff --git a/build.rs b/build.rs index 3ee44a4..26b1ed9 100644 --- a/build.rs +++ b/build.rs @@ -1,6 +1,4 @@ -use std::{ - process::{Command, ExitStatus, Output}, -}; +use std::process::{Command, ExitStatus, Output}; #[cfg(not(target_os = "windows"))] use std::os::unix::process::ExitStatusExt; diff --git a/src/config.rs b/src/config.rs index 5ece232..8cc1d3b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -90,7 +90,7 @@ impl Config { default_use_hls: parse("LIBREDDIT_DEFAULT_USE_HLS"), default_hide_hls_notification: parse("LIBREDDIT_DEFAULT_HIDE_HLS"), default_hide_awards: parse("LIBREDDIT_DEFAULT_HIDE_AWARDS"), - default_hide_score: parse("LIBREDDIT_DEFAULT_HIDE_SCORE"), + default_hide_score: parse("LIBREDDIT_DEFAULT_HIDE_SCORE"), default_subscriptions: parse("LIBREDDIT_DEFAULT_SUBSCRIPTIONS"), default_disable_visit_reddit_confirmation: parse("LIBREDDIT_DEFAULT_DISABLE_VISIT_REDDIT_CONFIRMATION"), banner: parse("LIBREDDIT_BANNER"), @@ -112,7 +112,7 @@ fn get_setting_from_config(name: &str, config: &Config) -> Option { "LIBREDDIT_DEFAULT_HIDE_HLS_NOTIFICATION" => config.default_hide_hls_notification.clone(), "LIBREDDIT_DEFAULT_WIDE" => config.default_wide.clone(), "LIBREDDIT_DEFAULT_HIDE_AWARDS" => config.default_hide_awards.clone(), - "LIBREDDIT_DEFAULT_HIDE_SCORE" => config.default_hide_score.clone(), + "LIBREDDIT_DEFAULT_HIDE_SCORE" => config.default_hide_score.clone(), "LIBREDDIT_DEFAULT_SUBSCRIPTIONS" => config.default_subscriptions.clone(), "LIBREDDIT_DEFAULT_DISABLE_VISIT_REDDIT_CONFIRMATION" => config.default_disable_visit_reddit_confirmation.clone(), "LIBREDDIT_BANNER" => config.banner.clone(), diff --git a/src/instance_info.rs b/src/instance_info.rs index 4a8044f..63a30ff 100644 --- a/src/instance_info.rs +++ b/src/instance_info.rs @@ -179,7 +179,7 @@ impl InstanceInfo { self.config.sfw_only, self.config.banner, self.config.default_hide_awards, - self.config.default_hide_score, + self.config.default_hide_score, self.config.default_theme, self.config.default_front_page, self.config.default_layout, diff --git a/src/settings.rs b/src/settings.rs index f0aa6e9..12795bc 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -32,7 +32,7 @@ const PREFS: [&str; 14] = [ "hide_hls_notification", "autoplay_videos", "hide_awards", - "hide_score", + "hide_score", "disable_visit_reddit_confirmation", ]; diff --git a/templates/comment.html b/templates/comment.html index 76abf16..74d313f 100644 --- a/templates/comment.html +++ b/templates/comment.html @@ -5,9 +5,13 @@ {% else if kind == "t1" %}
- {% if prefs.hide_score != "on" %} -

{{ score.0 }}

- {% endif %} +

+ {% if prefs.hide_score != "on" %} + {{ score.0 }} + {% else %} + • + {% endif %} +

diff --git a/templates/duplicates.html b/templates/duplicates.html index cf70a90..d8faf2d 100644 --- a/templates/duplicates.html +++ b/templates/duplicates.html @@ -83,9 +83,13 @@ {{ post.title }}{% if post.flags.nsfw %} NSFW{% endif %} - {% if prefs.hide_score != "on" %} -
{{ post.score.0 }} Upvotes
- {% endif %} +
+ {% if prefs.hide_score != "on" %} + {{ post.score.0 }} + {% else %} + • + {% endif %} + Upvotes
diff --git a/templates/search.html b/templates/search.html index 1921a0f..d076a30 100644 --- a/templates/search.html +++ b/templates/search.html @@ -77,9 +77,13 @@ {% else %}
+

{% if prefs.hide_score != "on" %} -

{{ post.score.0 }}

+ {{ post.score.0 }} + {% else %} + • {% endif %} +

diff --git a/templates/user.html b/templates/user.html index b3ee54c..3c97424 100644 --- a/templates/user.html +++ b/templates/user.html @@ -52,9 +52,13 @@ {% else %}
+

{% if prefs.hide_score != "on" %} -

{{ post.score.0 }}

+ {{ post.score.0 }} + {% else %} + • {% endif %} +

diff --git a/templates/utils.html b/templates/utils.html index 4c1dc4c..435e5f6 100644 --- a/templates/utils.html +++ b/templates/utils.html @@ -147,9 +147,13 @@
{{ post.body|safe }}
+
{% if prefs.hide_score != "on" %} -
{{ post.score.0 }} Upvotes
+ {{ post.score.0 }} + {% else %} + • {% endif %} + Upvotes