fix(map): show correct "Last seen" for cached contacts

Used c.last_advert (numeric Unix timestamp) instead of c.last_seen
(ISO 8601 string) which caused formatTimeAgo() to return "Invalid Date".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-03-23 07:50:46 +01:00
parent aa1a1b203c
commit 8aff9be570

View File

@@ -218,7 +218,7 @@ function updateMapMarkers() {
cachedFiltered.forEach(c => {
const typeNum = TYPE_LABEL_TO_NUM[c.type_label] || 1;
const color = CONTACT_TYPE_COLORS[typeNum] || '#2196F3';
const lastSeen = c.last_seen ? formatTimeAgo(c.last_seen) : '';
const lastSeen = c.last_advert ? formatTimeAgo(c.last_advert) : '';
L.circleMarker([c.adv_lat, c.adv_lon], {
radius: 8,