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

@@ -1,7 +1,9 @@
import Service from '@ember/service';
import Service, { service } from '@ember/service';
import { tracked } from '@glimmer/tracking';
export default class MapUiService extends Service {
@service nostrData;
@tracked selectedPlace = null;
@tracked isSearching = false;
@tracked isCreating = false;
@@ -19,12 +21,14 @@ export default class MapUiService extends Service {
selectPlace(place, options = {}) {
this.selectedPlace = place;
this.selectionOptions = options;
this.nostrData.loadPhotosForPlace(place);
}
clearSelection() {
this.selectedPlace = null;
this.selectionOptions = {};
this.preventNextZoom = false;
this.nostrData.loadPhotosForPlace(null);
}
setSearchResults(results) {