From f51c956b1296754e0763deecffafbfc33e41261f Mon Sep 17 00:00:00 2001 From: Casper Rogild Storm Date: Fri, 20 Sep 2024 23:19:33 +0200 Subject: [PATCH] Rebase --- data/src/config.rs | 1 + src/main.rs | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/data/src/config.rs b/data/src/config.rs index fd7d9910b..a411a6fe0 100644 --- a/data/src/config.rs +++ b/data/src/config.rs @@ -18,6 +18,7 @@ pub use self::notification::Notifications; pub use self::proxy::Proxy; pub use self::server::Server; pub use self::sidebar::Sidebar; + use crate::appearance::{self, Appearance}; use crate::audio::{self, Sound}; use crate::environment::config_dir; diff --git a/src/main.rs b/src/main.rs index 757d4f279..6b04dd705 100644 --- a/src/main.rs +++ b/src/main.rs @@ -204,7 +204,7 @@ pub enum Screen { #[derive(Debug)] pub enum Message { - ThemesReloaded(config::Themes), + AppearanceReloaded(data::appearance::Appearance), ScreenConfigReloaded(Result), Dashboard(dashboard::Message), Stream(stream::Update), @@ -281,8 +281,8 @@ impl Halloy { fn update(&mut self, message: Message) -> Task { match message { - Message::ThemesReloaded(updated) => { - self.config.themes = updated; + Message::AppearanceReloaded(appearance) => { + self.config.appearance = appearance; Task::none() } Message::ScreenConfigReloaded(updated) => { @@ -333,8 +333,8 @@ impl Halloy { Task::none() } Some(dashboard::Event::ReloadThemes) => Task::future(Config::load()) - .and_then(|config| Task::done(config.themes)) - .map(Message::ThemesReloaded), + .and_then(|config| Task::done(config.appearance)) + .map(Message::AppearanceReloaded), Some(dashboard::Event::QuitServer(server)) => { self.clients.quit(&server, None); Task::none()