()
| 14 | let unifiedToastDurationMs = DEFAULT_TOAST_DURATION_MS |
| 15 | |
| 16 | async function refreshToastDurationMs(): Promise<void> { |
| 17 | try { |
| 18 | const resolved = await loadToastDurationMs() |
| 19 | if (typeof resolved === "number" && Number.isFinite(resolved)) { |
| 20 | unifiedToastDurationMs = resolved |
| 21 | } |
| 22 | } catch { |
| 23 | // Keep the current value; the next poll/startup can retry. |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | function getToastDurationMs(): number { |
| 28 | return unifiedToastDurationMs |
no test coverage detected