Skip to main content

Vine/Server/Notification/
DisposeStatusBarItem.rs

1//! Cocoon → `disposeStatusBarItem` notification.
2//! Forwarded onto `sky://statusbar/dispose-entry` so the Sky shim removes the
3//! DOM node.
4
5use serde_json::{Value, json};
6
7use crate::{Host::VineHost, dev_log};
8
9pub async fn DisposeStatusBarItem(Host:&dyn VineHost, Parameter:&Value) {
10	let Id = Parameter.get("id").and_then(Value::as_str).unwrap_or("");
11
12	if Id.is_empty() {
13		dev_log!("grpc", "[StatusBar] dispose skip: missing id");
14
15		return;
16	}
17
18	Host.EmitToRenderer("sky://statusbar/dispose-entry", json!({ "id": Id }));
19
20	dev_log!("grpc", "[StatusBar] dispose id={}", Id);
21}