DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/IPC/WindServiceHandlers/UI/
NotificationUpdateProgress.rs1use serde_json::{Value, json};
4use tauri::{AppHandle, Emitter};
5use CommonLibrary::IPC::SkyEvent::SkyEvent;
6
7use crate::IPC::WindServiceHandlers::Utilities::JsonValueHelpers::{arg_f64, arg_string};
8
9pub async fn Fn(ApplicationHandle:AppHandle, Arguments:Vec<Value>) -> Result<Value, String> {
10 let Id = arg_string(&Arguments, 0);
11
12 let Increment = arg_f64(&Arguments, 1);
13
14 let Message = arg_string(&Arguments, 2);
15
16 let _ = ApplicationHandle.emit(
17 SkyEvent::NotificationProgressUpdate.AsStr(),
18 json!({
19 "id": Id,
20 "increment": Increment,
21 "message": Message,
22 }),
23 );
24
25 Ok(Value::Null)
26}