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.
This commit is contained in:
parent
ac51ecaada
commit
27f9b32dff
1 changed files with 5 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue