From 60b19ab8ca118b88a672444449e5439c91711d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E6=96=87=E5=B3=B0?= Date: Thu, 4 Jun 2026 17:56:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=B0=E5=9B=BE=E9=97=AA?= =?UTF-8?q?=E7=83=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- meshmap_frontend/src/App.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meshmap_frontend/src/App.vue b/meshmap_frontend/src/App.vue index 65fa752..7d9172b 100644 --- a/meshmap_frontend/src/App.vue +++ b/meshmap_frontend/src/App.vue @@ -112,6 +112,10 @@ function mergeMessages(existing: TextMessage[], incoming: TextMessage[]): TextMe return Array.from(byId.values()).sort(compareMessages) } +function isSameJSON(left: unknown, right: unknown): boolean { + return JSON.stringify(left) === JSON.stringify(right) +} + async function loadInitialChatMessages() { const response = await getTextMessages(chatPageSize, 0) messages.value = toChronological(response.items) @@ -170,7 +174,9 @@ async function loadMapReportsForBounds(bounds: MapBoundsQuery, zoom: number, sho if (requestSeq !== mapReportRequestSeq) { return } - mapViewportItems.value = response.items + if (!isSameJSON(mapViewportItems.value, response.items)) { + mapViewportItems.value = response.items + } mapViewportMode.value = response.mode mapReportTotal.value = response.total } catch (err) {