()
| 7 | * Used by the background polling in App.tsx for the toast notification. |
| 8 | */ |
| 9 | export async function checkForUpdate(): Promise<string | null> { |
| 10 | if (!isTauri()) return null; |
| 11 | try { |
| 12 | const update = await checkTauriUpdate(); |
| 13 | if (update) { |
| 14 | cachedUpdate = update; |
| 15 | return update.version; |
| 16 | } |
| 17 | } catch { |
| 18 | // Silent failure for background checks |
| 19 | } |
| 20 | return null; |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Download and install the cached update, then relaunch. |
no test coverage detected