chore: update config to use version
This commit is contained in:
parent
0505524eae
commit
30fd5c2c6e
2 changed files with 2 additions and 8 deletions
|
|
@ -3,13 +3,7 @@ use cosmic::cosmic_config::{self, CosmicConfigEntry};
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Default, Debug, Clone, Serialize, Deserialize, CosmicConfigEntry, PartialEq, Eq)]
|
||||
#[version = 1]
|
||||
pub struct AudioAppletConfig {
|
||||
pub show_media_controls_in_top_panel: bool,
|
||||
}
|
||||
|
||||
impl AudioAppletConfig {
|
||||
/// Returns the version of the config
|
||||
pub fn version() -> u64 {
|
||||
1
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ impl cosmic::Application for Audio {
|
|||
self.timeline.set_chain(chain).start();
|
||||
self.config.show_media_controls_in_top_panel = enabled;
|
||||
if let Ok(helper) =
|
||||
cosmic::cosmic_config::Config::new(Self::APP_ID, AudioAppletConfig::version())
|
||||
cosmic::cosmic_config::Config::new(Self::APP_ID, AudioAppletConfig::VERSION)
|
||||
{
|
||||
if let Err(err) = self.config.write_entry(&helper) {
|
||||
tracing::error!(?err, "Error writing config");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue