Explorar el Código

Remove unnecessary deduplication logic

Vishnu Mohandas hace 5 años
padre
commit
b98a3cc530
Se han modificado 1 ficheros con 0 adiciones y 11 borrados
  1. 0 11
      lib/ui/gallery.dart

+ 0 - 11
lib/ui/gallery.dart

@@ -59,7 +59,6 @@ class _GalleryState extends State<Gallery> {
     // TODO: Investigate reason for multiple rebuilds on selection change
     // TODO: Investigate reason for multiple rebuilds on selection change
     _photos = widget.photos;
     _photos = widget.photos;
     _selectedPhotos = widget.selectedPhotos;
     _selectedPhotos = widget.selectedPhotos;
-    _deduplicatePhotos();
     _collatePhotos();
     _collatePhotos();
     final list = ListView.builder(
     final list = ListView.builder(
       itemCount: _collatedPhotos.length,
       itemCount: _collatedPhotos.length,
@@ -184,16 +183,6 @@ class _GalleryState extends State<Gallery> {
     );
     );
   }
   }
 
 
-  void _deduplicatePhotos() {
-    for (int index = 1; index < _photos.length; index++) {
-      final current = _photos[index], previous = _photos[index - 1];
-      if (current.localId != null && current.localId == previous.localId) {
-        _photos.removeAt(index);
-        index--;
-      }
-    }
-  }
-
   void _collatePhotos() {
   void _collatePhotos() {
     final dailyPhotos = List<Photo>();
     final dailyPhotos = List<Photo>();
     final collatedPhotos = List<List<Photo>>();
     final collatedPhotos = List<List<Photo>>();