refactor(cosmic-theme): Get ThemeMode version from cosmic config derive

This commit is contained in:
Michael Aaron Murphy 2024-03-05 16:06:10 +01:00
parent dfe1f48ef9
commit 5f5b94eecb
No known key found for this signature in database
GPG key ID: B2732D4240C9212C

View file

@ -30,13 +30,12 @@ impl ThemeMode {
config.get::<bool>("is_dark")
}
/// version of the theme
pub fn version() -> u64 {
1
pub const fn version() -> u64 {
Self::VERSION
}
/// Get the config for the theme mode
pub fn config() -> Result<Config, cosmic_config::Error> {
Config::new(THEME_MODE_ID, Self::version())
Config::new(THEME_MODE_ID, Self::VERSION)
}
}