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.
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 setlastEntity
from monitored apps to prevent sending heartbeats too frequently.