mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-05-22 16:19:46 +02:00
profile filtering and submissions fixes
This commit is contained in:
@@ -18,14 +18,16 @@ class PendingUpload {
|
||||
'lat': coord.latitude,
|
||||
'lon': coord.longitude,
|
||||
'dir': direction,
|
||||
'profile': profile.name,
|
||||
'profile': profile.toJson(),
|
||||
'attempts': attempts,
|
||||
};
|
||||
|
||||
factory PendingUpload.fromJson(Map<String, dynamic> j) => PendingUpload(
|
||||
coord: LatLng(j['lat'], j['lon']),
|
||||
direction: j['dir'],
|
||||
profile: CameraProfile.alpr(), // only built‑in for now
|
||||
profile: j['profile'] is Map<String, dynamic>
|
||||
? CameraProfile.fromJson(j['profile'])
|
||||
: CameraProfile.alpr(), // fallback for legacy, more logic can be added
|
||||
attempts: j['attempts'] ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user