Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Move constants

laurenspriemeb19d0af9722
diff --git a/mobile/lib/models/memories/memories_cache.dart b/mobile/lib/models/memories/memories_cache.dart
index 06a57341d9..8d6a85d4a1 100644
--- a/mobile/lib/models/memories/memories_cache.dart
+++ b/mobile/lib/models/memories/memories_cache.dart
@@ -5,6 +5,7 @@ import "package:photos/models/file/file.dart";
import "package:photos/models/location/location.dart";
import "package:photos/models/memories/people_memory.dart";
import "package:photos/models/memories/smart_memory.dart";
+import "package:photos/models/memories/smart_memory_constants.dart";
import "package:photos/models/memories/trip_memory.dart";
const kPersonShowTimeout = Duration(days: 7 * 10);
diff --git a/mobile/lib/models/memories/smart_memory.dart b/mobile/lib/models/memories/smart_memory.dart
index d3527b2895..b00f83e2bb 100644
--- a/mobile/lib/models/memories/smart_memory.dart
+++ b/mobile/lib/models/memories/smart_memory.dart
@@ -1,9 +1,5 @@
import "package:photos/models/memories/memory.dart";
-const kMemoriesUpdateFrequency = Duration(days: 7);
-const kMemoriesMargin = Duration(days: 2);
-const kDayItself = Duration(days: 1);
-
enum MemoryType {
people,
trips,
diff --git a/mobile/lib/models/memories/smart_memory_constants.dart b/mobile/lib/models/memories/smart_memory_constants.dart
new file mode 100644
index 0000000000..3697d3ddcc
--- /dev/null
+++ b/mobile/lib/models/memories/smart_memory_constants.dart
@@ -0,0 +1,4 @@
+// Constants for computing smart memories
+const kMemoriesUpdateFrequency = Duration(days: 7);
+const kMemoriesMargin = Duration(days: 2);
+const kDayItself = Duration(days: 1);
diff --git a/mobile/lib/services/memories_cache_service.dart b/mobile/lib/services/memories_cache_service.dart
index cdc768f3aa..bc0f6fe466 100644
--- a/mobile/lib/services/memories_cache_service.dart
+++ b/mobile/lib/services/memories_cache_service.dart
@@ -12,6 +12,7 @@ import "package:photos/models/file/file.dart";
import "package:photos/models/memories/memories_cache.dart";
import "package:photos/models/memories/memory.dart";
import "package:photos/models/memories/smart_memory.dart";
+import "package:photos/models/memories/smart_memory_constants.dart";
import "package:photos/service_locator.dart";
import "package:photos/services/location_service.dart";
import "package:photos/services/search_service.dart";
diff --git a/mobile/lib/services/smart_memories_service.dart b/mobile/lib/services/smart_memories_service.dart
index e487b52782..d3c1f7cb44 100644
--- a/mobile/lib/services/smart_memories_service.dart
+++ b/mobile/lib/services/smart_memories_service.dart
@@ -20,6 +20,7 @@ import "package:photos/models/memories/memories_cache.dart";
import "package:photos/models/memories/memory.dart";
import "package:photos/models/memories/people_memory.dart";
import "package:photos/models/memories/smart_memory.dart";
+import "package:photos/models/memories/smart_memory_constants.dart";
import "package:photos/models/memories/time_memory.dart";
import "package:photos/models/memories/trip_memory.dart";
import "package:photos/models/ml/face/face_with_embedding.dart";