()
| 301 | |
| 302 | /** Resolve global toast duration from server config via RPC. */ |
| 303 | export async function loadToastDurationMs(): Promise<number> { |
| 304 | if (!rpcClient) return 5000; |
| 305 | try { |
| 306 | const result = await rpcClient.call<{ toastDurationMs?: number }>("toast-duration", {}); |
| 307 | return typeof result.toastDurationMs === "number" ? result.toastDurationMs : 5000; |
| 308 | } catch { |
| 309 | return 5000; |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | /** |
| 314 | * Fetch the current startup announcement from the server, if any. |
no outgoing calls
no test coverage detected