(fix) felhős projekthez csak bejelentkezés után lehet csatlakozni, név megjelenítése a kapcsolatok mellett a terepbejárás nézetben.
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
This commit is contained in:
@@ -1241,6 +1241,11 @@ class MapSurveyController extends GetxController implements StyleEditable {
|
||||
|
||||
final contactMarkers = <Marker>[].obs;
|
||||
|
||||
/// Nyers lista a feliratozáshoz (a contactMarkers már kész Marker-eket
|
||||
/// tartalmaz, abból nem érhető el a név) — ugyanaz a szűrt kör, csak
|
||||
/// Contact-objektumként, hogy a felirat-réteg is el tudja olvasni.
|
||||
final contactsWithLocation = <ContactWithState>[].obs;
|
||||
|
||||
Future<void> saveContactAtPoint(LatLng point) async {
|
||||
activeEditTool.value = MapEditTool.none;
|
||||
if (!PermissionService.to.canContacts) return;
|
||||
@@ -1272,20 +1277,21 @@ class MapSurveyController extends GetxController implements StyleEditable {
|
||||
Future<void> _loadContactMarkers() async {
|
||||
if (!PermissionService.to.canContacts) {
|
||||
contactMarkers.clear();
|
||||
contactsWithLocation.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
final projectId = ProjectService.to.activeProject.value?.uuid;
|
||||
if (projectId == null) {
|
||||
contactMarkers.clear();
|
||||
contactsWithLocation.clear();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
final all = await ContactService.to.listMerged(projectId);
|
||||
contactMarkers.value = all
|
||||
.where((c) => c.contact.hasLocation)
|
||||
.map(_markerFromContact)
|
||||
.toList();
|
||||
final located = all.where((c) => c.contact.hasLocation).toList();
|
||||
contactsWithLocation.value = located;
|
||||
contactMarkers.value = located.map(_markerFromContact).toList();
|
||||
} catch (_) {
|
||||
// Offline/hiba: a meglévő jelölők maradnak, nem törli ki csendben.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user