[mob] sync person entity type

This commit is contained in:
Neeraj Gupta 2024-04-01 14:56:37 +05:30
parent 768fa3d1ce
commit a75c440dc2
2 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,7 @@ import "package:flutter/foundation.dart";
enum EntityType {
location,
person,
unknown,
}
@ -9,6 +10,8 @@ EntityType typeFromString(String type) {
switch (type) {
case "location":
return EntityType.location;
case "person":
return EntityType.location;
}
debugPrint("unexpected collection type $type");
return EntityType.unknown;
@ -19,6 +22,8 @@ extension EntityTypeExtn on EntityType {
switch (this) {
case EntityType.location:
return "location";
case EntityType.person:
return "person";
case EntityType.unknown:
return "unknown";
}

View File

@ -87,6 +87,7 @@ class EntityService {
Future<void> syncEntities() async {
try {
await _remoteToLocalSync(EntityType.location);
await _remoteToLocalSync(EntityType.person);
} catch (e) {
_logger.severe("Failed to sync entities", e);
}