π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add safety check
ashilkn4d26de8ffd31
diff --git a/mobile/lib/services/album_home_widget_service.dart b/mobile/lib/services/album_home_widget_service.dartindex 652f99de27..4bf8864940 100644--- a/mobile/lib/services/album_home_widget_service.dart+++ b/mobile/lib/services/album_home_widget_service.dart@@ -414,6 +414,9 @@ class AlbumHomeWidgetService {while (renderedCount < limit && attemptsCount < maxAttempts) {final randomEntry =albumsWithFilesEntries[random.nextInt(albumsWithFilesLength)];++ if (randomEntry.value.$2.isEmpty) continue;+final randomAlbumFile = randomEntry.value.$2.elementAt(random.nextInt(randomEntry.value.$2.length),);diff --git a/mobile/lib/services/memory_home_widget_service.dart b/mobile/lib/services/memory_home_widget_service.dartindex 4e6e2ab9b3..c015dd0a69 100644--- a/mobile/lib/services/memory_home_widget_service.dart+++ b/mobile/lib/services/memory_home_widget_service.dart@@ -320,6 +320,9 @@ class MemoryHomeWidgetService {while (renderedCount < limit && attemptsCount < maxAttempts) {final randomEntry =memoriesWithFilesEntries[random.nextInt(memoriesWithFilesLength)];++ if (randomEntry.value.isEmpty) continue;+final randomMemoryFile = randomEntry.value.elementAt(random.nextInt(randomEntry.value.length),);diff --git a/mobile/lib/services/people_home_widget_service.dart b/mobile/lib/services/people_home_widget_service.dartindex 6b13ce0df6..ee758caac0 100644--- a/mobile/lib/services/people_home_widget_service.dart+++ b/mobile/lib/services/people_home_widget_service.dart@@ -393,6 +393,9 @@ class PeopleHomeWidgetService {while (renderedCount < limit && attemptsCount < maxAttempts) {final randomEntry =peopleWithFilesEntries[random.nextInt(peopleWithFilesLength)];++ if (randomEntry.value.$2.isEmpty) continue;+final randomPersonFile = randomEntry.value.$2.elementAt(random.nextInt(randomEntry.value.$2.length),);