From 537f376ebdaf7e19c6b4b129ef4a6f1d9c6e1e97 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Tue, 10 Sep 2024 18:12:09 +0530 Subject: [PATCH] [mob][photos] Remove limit of discovery section for non-internal users --- mobile/lib/services/magic_cache_service.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mobile/lib/services/magic_cache_service.dart b/mobile/lib/services/magic_cache_service.dart index e6c78cc5db..bbc1a9bd83 100644 --- a/mobile/lib/services/magic_cache_service.dart +++ b/mobile/lib/services/magic_cache_service.dart @@ -197,13 +197,11 @@ class MagicCacheService { } ///Returns random non-empty magic results from magicPromptsData - ///Length is capped at [limit], can be less than [limit] if there are not enough - ///non-empty results + ///Length is number of prompts, can be less if there are not enough non-empty + ///results Future> _nonEmptyMagicResults( List magicPromptsData, ) async { - //Show all magic prompts to internal users for feedback on results - final limit = flagService.internalUser ? magicPromptsData.length : 4; final results = []; final randomIndexes = List.generate( magicPromptsData.length, @@ -221,7 +219,7 @@ class MagicCacheService { ), ); } - if (results.length >= limit) { + if (results.length >= magicPromptsData.length) { break; } }