UTCMenuClock icon indicating copy to clipboard operation
UTCMenuClock copied to clipboard

Fix duplicate NSWorkspaceDidWakeNotification observations

Open davidme-stripe opened this issue 3 weeks ago • 0 comments

I incorrectly added an observer to NSWorkspaceDidWakeNotification during the scheduleTimer function. When showing seconds, this means that UTCMenuClock would re-register for the notification every second, and it would re-register observation that many times on each wake. This caused https://github.com/netik/UTCMenuClock/issues/20.

Moving the observation to awakeFromNib should fix it. I also renamed the function to make it clearer that this should be only called once. Sorry for breaking it!

davidme-stripe avatar Jan 08 '26 01:01 davidme-stripe