mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
fix(menubar): manual cadence never respawns from stuck-refresh cleanup
Stale-force or stale-loading recovery could set shouldForceRefresh even with a nil interval, so Manual mode (and its wake path) still spawned after a stuck fetch. Cleanup now clears state without respawning unless the cadence allows auto-spawns; the next user interaction fetches. Refs #647
This commit is contained in:
parent
b4c04e7beb
commit
fd3ec8707c
1 changed files with 5 additions and 2 deletions
|
|
@ -573,9 +573,12 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSPopoverDelegate {
|
|||
// and never auto-spawning in Manual (#647).
|
||||
let interval = currentRefreshInterval()
|
||||
let intervalElapsed = interval.map { sinceLast >= $0 } ?? false
|
||||
// Stuck-refresh cleanup may retrigger a spawn only when the cadence
|
||||
// allows auto-spawns at all: in Manual mode the stale state is
|
||||
// cleared and the next user interaction fetches fresh.
|
||||
let recoveryRespawnAllowed = interval != nil
|
||||
let shouldForceRefresh = forcePayload ||
|
||||
clearedStaleForceRefresh ||
|
||||
clearedStaleLoading ||
|
||||
((clearedStaleForceRefresh || clearedStaleLoading) && recoveryRespawnAllowed) ||
|
||||
intervalElapsed
|
||||
|
||||
if shouldForceRefresh {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue