added leaving reddit dialog (#643)

This commit is contained in:
potatoesAreGod 2023-02-08 00:22:37 -07:00 committed by Daniel Valentine
commit fa68bf561b
No known key found for this signature in database
GPG key ID: C82492E4FF813823
9 changed files with 196 additions and 7 deletions

View file

@ -19,7 +19,7 @@ struct SettingsTemplate {
// CONSTANTS
const PREFS: [&str; 12] = [
const PREFS: [&str; 13] = [
"theme",
"front_page",
"layout",
@ -32,6 +32,7 @@ const PREFS: [&str; 12] = [
"hide_hls_notification",
"autoplay_videos",
"hide_awards",
"disable_visit_reddit_confirmation",
];
// FUNCTIONS

View file

@ -505,6 +505,7 @@ pub struct Preferences {
pub hide_hls_notification: String,
pub use_hls: String,
pub autoplay_videos: String,
pub disable_visit_reddit_confirmation: String,
pub comment_sort: String,
pub post_sort: String,
pub subscriptions: Vec<String>,
@ -538,6 +539,7 @@ impl Preferences {
use_hls: setting(&req, "use_hls"),
hide_hls_notification: setting(&req, "hide_hls_notification"),
autoplay_videos: setting(&req, "autoplay_videos"),
disable_visit_reddit_confirmation: setting(&req, "disable_visit_reddit_confirmation"),
comment_sort: setting(&req, "comment_sort"),
post_sort: setting(&req, "post_sort"),
subscriptions: setting(&req, "subscriptions").split('+').map(String::from).filter(|s| !s.is_empty()).collect(),