Skip to main content

Vine/Server/Notification/
StatusBarLifecycle.rs

1//! Cocoon → `statusBar.update` / `statusBar.dispose` notifications.
2//! Derives the Sky event name from the wire method suffix and emits on
3//! `sky://statusbar/<suffix>`. Canonical prefix is `sky://statusbar/` (no
4//! hyphen) to match every other emit site in the statusbar group.
5
6use serde_json::Value;
7
8use crate::{Host::VineHost, dev_log};
9
10pub async fn StatusBarLifecycle(Host:&dyn VineHost, MethodName:&str, Parameter:&Value) {
11	let EventName = format!("sky://statusbar/{}", &MethodName["statusBar.".len()..]);
12
13	dev_log!("grpc", "[StatusBarLifecycle] emit {}", EventName);
14
15	Host.EmitToRenderer(&EventName, Parameter.clone());
16}