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

Changed files
+6 -1
lib
+6 -1
lib/screens/library_photos_select_sheet.dart
··· 40 40 Future<void> _fetchPhotos() async { 41 41 setState(() => _loading = true); 42 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(); 43 48 if (mounted) { 44 49 setState(() { 45 - _photos = photos; 50 + _photos = filteredPhotos; 46 51 _loading = false; 47 52 }); 48 53 }