♻️ Refactor config initialization by name and type
This commit is contained in:
parent
3ff00ac38f
commit
b599e2f7d4
18 changed files with 193 additions and 192 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use crate::config;
|
||||
use crate::core::theme::ThemeRef;
|
||||
use crate::global;
|
||||
|
||||
use std::sync::{LazyLock, RwLock};
|
||||
|
||||
|
|
@ -10,7 +10,7 @@ pub static THEMES: LazyLock<RwLock<Vec<ThemeRef>>> = LazyLock::new(|| RwLock::ne
|
|||
// DEFAULT THEME ***********************************************************************************
|
||||
|
||||
pub static THEME_DEFAULT: LazyLock<ThemeRef> =
|
||||
LazyLock::new(|| match theme_by_short_name(&config::SETTINGS.app.theme) {
|
||||
LazyLock::new(|| match theme_by_short_name(&global::SETTINGS.app.theme) {
|
||||
Some(theme) => theme,
|
||||
None => &crate::base::theme::Inception,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue