sync theme

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-09-07 18:57:49 +08:00
parent 17a7cbf7bb
commit b4e0101e3e
10 changed files with 84 additions and 18 deletions

View File

@@ -60,6 +60,8 @@ pub trait InvokeUiCM: Send + Clone + 'static + Sized {
fn remove_connection(&self, id: i32);
fn new_message(&self, id: i32, text: String);
fn change_theme(&self, dark: bool);
}
impl<T: InvokeUiCM> Deref for ConnectionManager<T> {
@@ -280,6 +282,9 @@ pub async fn start_ipc<T: InvokeUiCM>(cm: ConnectionManager<T>) {
.send(ClipboardFileData::Enable((conn_id, enabled)))
.ok();
}
Data::Theme(dark) => {
cm.change_theme(dark);
}
_ => {
}