Fetch and cache photo events while browsing map and when opening place details

This commit is contained in:
2026-04-21 21:28:57 +04:00
parent 8d40b3bb35
commit 99cfd96ca1
4 changed files with 154 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ export default class MapComponent extends Component {
@service mapUi;
@service router;
@service settings;
@service nostrData;
mapInstance;
bookmarkSource;
@@ -1078,6 +1079,7 @@ export default class MapComponent extends Component {
const bbox = { minLat, minLon, maxLat, maxLon };
this.mapUi.updateBounds(bbox);
await this.storage.loadPlacesInBounds(bbox);
this.nostrData.loadPlacesInBounds(bbox);
this.loadBookmarks(this.storage.placesInView);
// Persist view to localStorage

View File

@@ -183,6 +183,7 @@ export default class PlacePhotoUpload extends Component {
const event = await factory.sign(template);
await this.nostrRelay.publish(this.nostrData.activeWriteRelays, event);
this.nostrData.store.add(event);
this.toast.show('Photos published successfully');
this.status = '';