Blur NSFW posts.

Reimplementation of libreddit/libreddit#482.

Co-authored by: Daniel Valentine <Daniel-Valentine@users.noreply.github.com>
This commit is contained in:
NKIPSC 2022-11-09 08:49:39 -07:00 committed by Daniel Valentine
commit fade305f90
7 changed files with 106 additions and 49 deletions

View file

@ -19,7 +19,7 @@ struct SettingsTemplate {
// CONSTANTS
const PREFS: [&str; 10] = [
const PREFS: [&str; 11] = [
"theme",
"front_page",
"layout",
@ -27,6 +27,7 @@ const PREFS: [&str; 10] = [
"comment_sort",
"post_sort",
"show_nsfw",
"blur_nsfw",
"use_hls",
"hide_hls_notification",
"autoplay_videos",

View file

@ -462,6 +462,7 @@ pub struct Preferences {
pub layout: String,
pub wide: String,
pub show_nsfw: String,
pub blur_nsfw: String,
pub hide_hls_notification: String,
pub use_hls: String,
pub autoplay_videos: String,
@ -493,6 +494,7 @@ impl Preferences {
layout: setting(&req, "layout"),
wide: setting(&req, "wide"),
show_nsfw: setting(&req, "show_nsfw"),
blur_nsfw: setting(&req, "blur_nsfw"),
use_hls: setting(&req, "use_hls"),
hide_hls_notification: setting(&req, "hide_hls_notification"),
autoplay_videos: setting(&req, "autoplay_videos"),