Skip to main content

Vine/Server/Notification/
WindowShowMessage.rs

1//! Cocoon `window.showMessage` notification - fire-and-forget toast.
2//! Distinct from `Window.ShowMessage` (capitalised, round-trip
3//! request); this is the notification form that does not wait for a
4//! button selection.
5
6use serde_json::Value;
7
8use crate::{Host::VineHost, dev_log};
9
10pub async fn WindowShowMessage(Host:&dyn VineHost, Parameter:&Value) {
11	dev_log!(
12		"grpc",
13		"[WindowShowMessage] message={:?}",
14		Parameter.get("message").and_then(Value::as_str).unwrap_or("")
15	);
16
17	Host.EmitToRenderer("sky://notification/show", Parameter.clone());
18}