@@ -2,11 +2,9 @@ import 'package:flutter/material.dart';
22import 'package:photos/core/configuration.dart' ;
33import 'package:photos/generated/l10n.dart' ;
44import 'package:photos/models/collection/collection.dart' ;
5- import 'package:photos/models/collection/collection_items.dart' ;
65import 'package:photos/service_locator.dart' ;
76import 'package:photos/services/collections_service.dart' ;
87import 'package:photos/theme/ente_theme.dart' ;
9- import 'package:photos/ui/collections/collection_item_widget.dart' ;
108import 'package:photos/ui/components/buttons/button_widget.dart' ;
119import 'package:photos/ui/components/models/button_type.dart' ;
1210
@@ -72,7 +70,7 @@ class _HierarchicalAlbumPickerState extends State<HierarchicalAlbumPicker> {
7270 // Apply additional filters
7371 if (widget.showOnlyOwnedAlbums) {
7472 _allCollections = _allCollections
75- .where ((c) => c.owner? .id == userId)
73+ .where ((c) => c.owner.id == userId)
7674 .toList ();
7775 }
7876
@@ -87,11 +85,11 @@ class _HierarchicalAlbumPickerState extends State<HierarchicalAlbumPicker> {
8785 _allCollections = _allCollections
8886 .where ((c) => c.type != CollectionType .favorites &&
8987 c.type != CollectionType .uncategorized &&
90- ! c.isDefaultHidden ())
88+ ! c.isDefaultHidden (), )
9189 .toList ();
9290
9391 // Sort by name
94- _allCollections.sort ((a, b) => a.displayName.compareTo (b.displayName));
92+ _allCollections.sort ((a, b) => a.displayName.compareTo (b.displayName), );
9593
9694 // Update current level collections
9795 _updateCurrentLevelCollections ();
@@ -103,7 +101,7 @@ class _HierarchicalAlbumPickerState extends State<HierarchicalAlbumPicker> {
103101 _currentLevelCollections = _allCollections
104102 .where ((c) => c.displayName
105103 .toLowerCase ()
106- .contains (widget.searchQuery! .toLowerCase ()))
104+ .contains (widget.searchQuery! .toLowerCase ()), )
107105 .toList ();
108106 } else {
109107 // Show hierarchical view
@@ -330,7 +328,7 @@ class _HierarchicalAlbumPickerState extends State<HierarchicalAlbumPicker> {
330328 if (_currentLocation != null ) {
331329 // Create sub-album
332330 newCollection = await CollectionsService .instance
333- .createSubAlbum (_currentLocation ! , albumName );
331+ .createSubAlbum (albumName, _currentLocation ! );
334332 } else {
335333 // Create root album
336334 newCollection = await CollectionsService .instance
@@ -495,7 +493,7 @@ class _HierarchicalAlbumPickerState extends State<HierarchicalAlbumPicker> {
495493 labelText: widget.actionButtonText ??
496494 AppLocalizations .of (context).add,
497495 isDisabled: _selectedCollections.isEmpty,
498- onTap: () {
496+ onTap: () async {
499497 widget.onMultipleAlbumsSelected? .call (
500498 _selectedCollections.toList (),
501499 );
0 commit comments