Skip to content

feat: Add live updates for remaining time in menu#241

Open
bryanvrgsc wants to merge 1 commit intonewmarcel:mainfrom
bryanvrgsc:feature/live-menu-updates
Open

feat: Add live updates for remaining time in menu#241
bryanvrgsc wants to merge 1 commit intonewmarcel:mainfrom
bryanvrgsc:feature/live-menu-updates

Conversation

@bryanvrgsc
Copy link
Copy Markdown

  • Add NSTimer to update remaining time every second
  • Use NSRunLoopCommonModes so timer fires while menu is open
  • Implement menuWillOpen: and menuDidClose: delegates
  • Timer starts when menu opens, stops when menu closes

The timer must use NSRunLoopCommonModes because the menu tracking uses NSEventTrackingRunLoopMode, not the default mode.

- Add NSTimer to update remaining time every second
- Use NSRunLoopCommonModes so timer fires while menu is open
- Implement menuWillOpen: and menuDidClose: delegates
- Timer starts when menu opens, stops when menu closes

The timer must use NSRunLoopCommonModes because the menu tracking
uses NSEventTrackingRunLoopMode, not the default mode.
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