From 9fa1e779470ee979bb7e5505d0e58ca3390b40a8 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Wed, 11 Sep 2024 11:00:24 +0530 Subject: [PATCH] [mob][photos] Use better names --- mobile/lib/services/magic_cache_service.dart | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mobile/lib/services/magic_cache_service.dart b/mobile/lib/services/magic_cache_service.dart index 59302034e7..0907b46a77 100644 --- a/mobile/lib/services/magic_cache_service.dart +++ b/mobile/lib/services/magic_cache_service.dart @@ -97,9 +97,9 @@ class MagicCacheService { if (!localSettings.isMLIndexingEnabled) { return; } - final jsonFile = await RemoteAssetsService.instance + final updatedJSONFile = await RemoteAssetsService.instance .getAssetIfUpdated(_kMagicPromptsDataUrl); - if (jsonFile != null) { + if (updatedJSONFile != null) { Future.delayed(_kCacheUpdateDelay, () { unawaited(_updateCache()); }); @@ -204,14 +204,14 @@ class MagicCacheService { ) async { final results = []; for (dynamic prompt in magicPromptsData) { - final files = await _getMatchingFileIDsForPromptData( + final fileUploadedIDs = await _getMatchingFileIDsForPromptData( prompt as Map, ); - if (files.isNotEmpty) { + if (fileUploadedIDs.isNotEmpty) { results.add( MagicCache( prompt["title"] as String, - files, + fileUploadedIDs, ), ); }