fix: detect new events after detector trims event buffer

The detector caps Events at 500 entries, trimming old ones from the
front. The previous check (len > prevCount) would fail once the slice
was trimmed, since the length could stay the same or decrease. This
caused spank to stop detecting slaps after ~500 events.

Switch to tracking lastEventIdx and using != instead of > to correctly
detect new events regardless of internal trimming.

Closes #2
taigrrcommitted parent 96333bf4593b99caeb03ba58299f60652b961cdcecfa02cBrowse files
3 files changed+64−62

Rendering diff…