Skip to content

Commit

Permalink
lock config once
Browse files Browse the repository at this point in the history
  • Loading branch information
fightling committed Aug 28, 2024
1 parent ed8ad0f commit 0b4dc3e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/backend/nc_notify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ pub struct NCNotify {

impl NCNotify {
pub fn new() -> Self {
let data = &config::get().data;
NCNotify {
app_name: config::get().data.general.chat_server_name.clone(),
timeout_ms: config::get().data.notifications.timeout_ms,
persistent: config::get().data.notifications.persistent,
silent: config::get().data.notifications.silent,
app_name: data.general.chat_server_name.clone(),
timeout_ms: data.notifications.timeout_ms,
persistent: data.notifications.persistent,
silent: data.notifications.silent,
}
}

Expand Down

0 comments on commit 0b4dc3e

Please sign in to comment.