From 8ba357d8970dda309846dc740672c6e4ea0c875e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Fri, 16 Jan 2026 14:36:37 +0700 Subject: [PATCH] Load markers when ready, and from incoming changes --- app/components/map.gjs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/components/map.gjs b/app/components/map.gjs index ffe817b..d5f85ac 100644 --- a/app/components/map.gjs +++ b/app/components/map.gjs @@ -67,18 +67,21 @@ export default class MapComponent extends Component { }); // Load initial bookmarks - this.loadBookmarks(); - - // Listen for remote storage changes - this.storage.rs.on('connected', () => { + this.storage.rs.on('ready', () => { this.loadBookmarks(); }); + // Listen for remote storage changes + // this.storage.rs.on('connected', () => { + // this.loadBookmarks(); + // }); + // Listen to changes in the /places/ scope // keeping this as a backup or for future real-time sync support this.storage.rs.scope('/places/').on('change', (event) => { console.log('RemoteStorage change detected:', event); // this.loadBookmarks(); // Disabling auto-update for now per instructions, using explicit version action instead + this.loadBookmarks(); }); });