wakatime / macos-wakatime

Mac system tray app for automatic time tracking and metrics generated from your Xcode, Figma, Postman, etc. usage.
https://wakatime.com/mac
BSD 3-Clause "New" or "Revised" License
127 stars 22 forks source link

Prevent sending heartbeats too often #224

Closed alanhamlett closed 3 months ago

alanhamlett commented 3 months ago

This fixes a bug where switching from a monitored app to an un-monitored app then back to the monitored app would trigger a heartbeat, because lastEntity was set to the value from the un-monitored app. Instead, we should only set lastEntity from monitored apps to prevent sending heartbeats too frequently.