diff --git a/diff.txt b/diff.txt new file mode 100644 index 0000000..8546dbb --- /dev/null +++ b/diff.txt @@ -0,0 +1,324 @@ +diff --git a/src/main/footballMonitor.js b/src/main/footballMonitor.js +index 4bfda39..98bdec6 100644 +--- a/src/main/footballMonitor.js ++++ b/src/main/footballMonitor.js +@@ -176,21 +176,13 @@ function createFootballMonitor({ + const windowEndMs = 2 * 60 * 60 * 1000 + 45 * 60 * 1000; // 2h45m after kickoff + + const cached = store.get(FIXTURES_KEY, []); +- const watchedCached = cached.filter(f => +- ( +- (isWatchedFixture(f, favoriteTeams, pinnedFixtures) || +- pinnedFixtures.some(p => p.id === f.id)) && +- (() => { +- // Watcher only polls inside active match windows (plan ยง2.3)โ€ฆ +- if (!f.kickoffUtc) return true; +- const k = Date.parse(f.kickoffUtc); +- return now >= k - windowStartMs && now <= k + windowEndMs; +- })() +- ) || +- // โ€ฆbut a fixture the cache believes is LIVE stays watched past the +- // window so the dead-man switch can retire it. +- f.status === 'live' +- ); ++ const watchedCached = cached.filter(f => { ++ const isWatched = isWatchedFixture(f, favoriteTeams, pinnedFixtures) || pinnedFixtures.some(p => p.id === f.id); ++ if (!isWatched) return false; ++ const k = f.kickoffUtc ? Date.parse(f.kickoffUtc) : null; ++ const inWindow = !k || (now >= k - windowStartMs && now <= k + windowEndMs); ++ return inWindow || f.status === 'live'; ++ }); + + const targets = new Map(); + for (const f of watchedCached) { +diff --git a/src/renderer/settings/index.html b/src/renderer/settings/index.html +index 2a71ea0..434e6a8 100644 +--- a/src/renderer/settings/index.html ++++ b/src/renderer/settings/index.html +@@ -264,7 +264,21 @@ + +