Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

559 B
Raw Blame
use serde::Serialize;
use tauri::{AppHandle, Manager, Runtime, ipc::Channel, plugin::PluginHandle};

pub(crate) struct NetworkStatus<R: Runtime>(pub PluginHandle<R>);

#[derive(Serialize)]
struct WatchStatusArgs {
    channel: Channel,
}

#[tauri::command]
pub(crate) async fn watch_status<R: Runtime>(
    app: AppHandle<R>,
    channel: Channel,
) -> Result<(), String> {
    app.state::<NetworkStatus<R>>()
        .0
        .run_mobile_plugin_async("watchStatus", WatchStatusArgs { channel })
        .await
        .map_err(|error| error.to_string())
}