From 27f9b32dff07d44be99c177f50fa3fb9a0d4a3e0 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 19 Feb 2026 18:27:21 -0600 Subject: [PATCH] Fix duplicate station icons when live packet replaces historical Historical loading overrides all markers to historical:true, including the most-recent marker. When a new live packet arrives, the conversion check only looked for non-historical markers, missing the existing "current" marker. Broaden the check to also convert markers with is_most_recent_for_callsign set. --- assets/js/map.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/assets/js/map.ts b/assets/js/map.ts index d43fcb3..dd06307 100644 --- a/assets/js/map.ts +++ b/assets/js/map.ts @@ -1050,10 +1050,13 @@ let MapAPRSMap = { self.markerStates.forEach((state, id) => { const stateCallsign = state.callsign_group || state.callsign; - // Only convert non-historical markers for the same callsign, but exclude the incoming packet's ID + // Convert markers for the same callsign that are either live or were the + // most-recent marker (historical loading marks all packets as historical, + // so is_most_recent_for_callsign catches the "current" marker that was + // loaded from history) if ( stateCallsign === incomingCallsign && - !state.historical && + (!state.historical || state.is_most_recent_for_callsign) && String(id) !== String(data.id) ) { markersToConvert.push(String(id));