this repo has no description

feat: filter out photos already in gallery when fetching actor photos

+6 -1
+6 -1
lib/screens/library_photos_select_sheet.dart
··· 40 Future<void> _fetchPhotos() async { 41 setState(() => _loading = true); 42 final photos = await apiService.fetchActorPhotos(did: widget.actorDid); 43 if (mounted) { 44 setState(() { 45 - _photos = photos; 46 _loading = false; 47 }); 48 }
··· 40 Future<void> _fetchPhotos() async { 41 setState(() => _loading = true); 42 final photos = await apiService.fetchActorPhotos(did: widget.actorDid); 43 + // Get gallery items from provider 44 + final galleryItems = ref.read(galleryCacheProvider)[widget.galleryUri]?.items ?? []; 45 + final galleryUris = galleryItems.map((item) => item.uri).toSet(); 46 + // Filter out photos already in gallery 47 + final filteredPhotos = photos.where((photo) => !galleryUris.contains(photo.uri)).toList(); 48 if (mounted) { 49 setState(() { 50 + _photos = filteredPhotos; 51 _loading = false; 52 }); 53 }