This commit is contained in:
@@ -10,9 +10,7 @@ pub fn _build() -> gtk::Box {
|
||||
let host = TrayHost::new();
|
||||
|
||||
if let Ok(mut host) = host {
|
||||
glib::timeout_add_local(
|
||||
Duration::from_millis(1_000),
|
||||
move || {
|
||||
glib::timeout_add_local(Duration::from_millis(1_000), move || {
|
||||
for event in host.poll().unwrap() {
|
||||
match event {
|
||||
TrayEvent::ItemAdded(id) | TrayEvent::ItemChanged(id) => {
|
||||
@@ -30,8 +28,7 @@ pub fn _build() -> gtk::Box {
|
||||
}
|
||||
}
|
||||
ControlFlow::Continue
|
||||
}
|
||||
);
|
||||
});
|
||||
} else {
|
||||
error!(&LOGGER, "Couldn't get SystemTray");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user