Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Schedule update magic cache in 10 seconds if remote asset has changed

ashilkn815a730d5940
diff --git a/mobile/lib/services/magic_cache_service.dart b/mobile/lib/services/magic_cache_service.dart
index aba9d61533..b1cdd6c8c9 100644
--- a/mobile/lib/services/magic_cache_service.dart
+++ b/mobile/lib/services/magic_cache_service.dart
@@ -77,7 +77,11 @@ class MagicCacheService {
Future<void> _updateCacheIfNeeded() async {
final jsonFile = await RemoteAssetsService.instance
.getAssetIfUpdated(_kMagicPromptsDataUrl);
- if (jsonFile != null) {}
+ if (jsonFile != null) {
+ Future.delayed(const Duration(seconds: 10), () {
+ unawaited(updateMagicCache());
+ });
+ }
}
Future<List<int>> getMatchingFileIDsForPromptData(