Feature lock different types for UserSettings::status

This commit is contained in:
Quat3rnion 2024-06-02 18:10:57 -04:00
parent d1b3a9ad9e
commit c44521320d
1 changed files with 4 additions and 1 deletions

View File

@ -83,6 +83,9 @@ pub struct UserSettings {
#[cfg(not(feature = "sqlx"))] #[cfg(not(feature = "sqlx"))]
pub restricted_guilds: Vec<String>, pub restricted_guilds: Vec<String>,
pub show_current_game: bool, pub show_current_game: bool,
#[cfg(feature = "sqlx")]
pub status: UserStatus,
#[cfg(not(feature = "sqlx"))]
pub status: Shared<UserStatus>, pub status: Shared<UserStatus>,
pub stream_notifications_enabled: bool, pub stream_notifications_enabled: bool,
pub theme: UserTheme, pub theme: UserTheme,
@ -119,7 +122,7 @@ impl Default for UserSettings {
render_reactions: true, render_reactions: true,
restricted_guilds: Default::default(), restricted_guilds: Default::default(),
show_current_game: true, show_current_game: true,
status: Arc::new(RwLock::new(UserStatus::Online)), status: Default::default(),
stream_notifications_enabled: false, stream_notifications_enabled: false,
theme: UserTheme::Dark, theme: UserTheme::Dark,
timezone_offset: 0, timezone_offset: 0,