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

This commit is contained in:
ashilkn
2024-06-24 15:29:56 +05:30
parent 11666eeb33
commit 815a730d59

View File

@@ -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(