Skip to content

Commit

Permalink
Feature lock different types for UserSettings::status
Browse files Browse the repository at this point in the history
  • Loading branch information
Quat3rnion committed Jun 2, 2024
1 parent d1b3a9a commit c445213
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/types/entities/user_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ pub struct UserSettings {
#[cfg(not(feature = "sqlx"))]
pub restricted_guilds: Vec<String>,
pub show_current_game: bool,
#[cfg(feature = "sqlx")]
pub status: UserStatus,
#[cfg(not(feature = "sqlx"))]
pub status: Shared<UserStatus>,
pub stream_notifications_enabled: bool,
pub theme: UserTheme,
Expand Down Expand Up @@ -119,7 +122,7 @@ impl Default for UserSettings {
render_reactions: true,
restricted_guilds: Default::default(),
show_current_game: true,
status: Arc::new(RwLock::new(UserStatus::Online)),
status: Default::default(),
stream_notifications_enabled: false,
theme: UserTheme::Dark,
timezone_offset: 0,
Expand Down

0 comments on commit c445213

Please sign in to comment.