From 9a071b6e3a20916b119743992955d9392ed523b2 Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 27 Feb 2026 13:49:18 -0600 Subject: [PATCH] feat: refresh trail line when trail duration changes - Regenerate trail line after trail duration update - Trail line now respects trail duration setting --- lib/aprsme_web/live/map_live/index.ex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/aprsme_web/live/map_live/index.ex b/lib/aprsme_web/live/map_live/index.ex index d51aab2..2a27019 100644 --- a/lib/aprsme_web/live/map_live/index.ex +++ b/lib/aprsme_web/live/map_live/index.ex @@ -535,6 +535,14 @@ defmodule AprsmeWeb.MapLive.Index do # Trigger cleanup to remove packets that are now outside the new duration send(self(), :cleanup_old_packets) + # If tracking a callsign at low zoom, refresh the trail line with new duration + socket = + if socket.assigns.tracked_callsign != "" and socket.assigns.map_zoom <= 8 do + DisplayManager.send_trail_line_for_tracked_callsign(socket) + else + socket + end + {:noreply, socket} end