mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-10 18:36:15 -08:00
download-broadcast keeps a module-level BrowserWindow reference set once during bootstrap. The main window is not created once per process: macOS rebuilds it on dock 'activate' and now also when the single-instance guard hands over a second launch. The stale reference is guarded by isDestroyed(), so every DOWNLOADS_UPDATE_EVENT was silently dropped and the new renderer never saw download progress again. App.onMainWindowCreated() registers listeners that fire for the current window and again for every rebuilt one, and main.ts binds the downloads broadcaster through it. This also fixes the pre-existing dock-activate case on master. Reported by Codex review on #1272. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>