Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob] sync person entity type

Neeraj Guptaa75c440dc2bf
diff --git a/mobile/lib/models/api/entity/type.dart b/mobile/lib/models/api/entity/type.dart
index 3631792ded..88e60d62f3 100644
--- a/mobile/lib/models/api/entity/type.dart
+++ b/mobile/lib/models/api/entity/type.dart
@@ -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";
}
diff --git a/mobile/lib/services/entity_service.dart b/mobile/lib/services/entity_service.dart
index e681f37b71..29bb085278 100644
--- a/mobile/lib/services/entity_service.dart
+++ b/mobile/lib/services/entity_service.dart
@@ -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);
}