Ver Fonte

Merge pull request #683 from ente-io/dispose-value-notifiers

Dispose ValueNotifiers
Vishnu Mohandas há 2 anos atrás
pai
commit
b81fe42a8f

+ 3 - 1
lib/ui/huge_listview/lazy_loading_gallery.dart

@@ -162,7 +162,9 @@ class _LazyLoadingGalleryState extends State<LazyLoadingGallery> {
     _reloadEventSubscription.cancel();
     _currentIndexSubscription.cancel();
     widget.selectedFiles.removeListener(_selectedFilesListener);
-
+    _toggleSelectAllFromDay.dispose();
+    _showSelectAllButton.dispose();
+    _areAllFromDaySelected.dispose();
     super.dispose();
   }
 

+ 6 - 0
lib/ui/settings/storage_card_widget.dart

@@ -42,6 +42,12 @@ class _StorageCardWidgetState extends State<StorageCardWidget> {
     precacheImage(_background.image, context);
   }
 
+  @override
+  void dispose() {
+    _isStorageCardPressed.dispose();
+    super.dispose();
+  }
+
   @override
   Widget build(BuildContext context) {
     final inheritedUserDetails = InheritedUserDetails.of(context);