mirror of
https://github.com/ente-io/ente.git
synced 2025-08-05 14:17:10 +00:00
[mob] sync person entity type
This commit is contained in:
parent
768fa3d1ce
commit
a75c440dc2
@ -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";
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user