sync theme

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages committed 2022-09-08 10:25:17 +08:00
1 parent 17a7cbf7bb
commit b4e0101e3e
10 files changed
+84 -18

No files matched your search

+5
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);
}
_ => {
}