Skip to content

fix: menubar auto refresh stops working after idle#137

Merged
iamtoruk merged 1 commit intomainfrom
fix/menubar-auto-refresh
Apr 23, 2026
Merged

fix: menubar auto refresh stops working after idle#137
iamtoruk merged 1 commit intomainfrom
fix/menubar-auto-refresh

Conversation

@iamtoruk
Copy link
Copy Markdown
Member

The menubar price freezes after the app is idle for a while. This happens because macOS App Nap suspends Task.sleep even when beginActivity is set.

This PR replaces Task.sleep with DispatchSourceTimer which keeps firing reliably in background. It also adds observers for system wake and screen wake events to force an immediate refresh when the Mac resumes from sleep.

Tested by leaving the app running for extended periods while using other applications.

The menubar price would freeze after the app was idle for a while because macOS App Nap suspends Task.sleep even with beginActivity.

Replace Task.sleep with DispatchSourceTimer which is more robust for background execution. Also add observers for system wake and screen wake events to force a refresh when the Mac resumes from sleep.
@iamtoruk iamtoruk merged commit 48d2373 into main Apr 23, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant