π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] create albums from unmatched searches
r4khulf92c4c6afde7
diff --git a/mobile/apps/photos/lib/ui/collections/album/vertical_list.dart b/mobile/apps/photos/lib/ui/collections/album/vertical_list.dartindex d29ea99910..19cf5b7980 100644--- a/mobile/apps/photos/lib/ui/collections/album/vertical_list.dart+++ b/mobile/apps/photos/lib/ui/collections/album/vertical_list.dart@@ -281,21 +281,27 @@ class _AlbumVerticalListWidgetState extends State<AlbumVerticalListWidget> {Widget _getNewAlbumWidget(BuildContext context, int filesCount) {return NewAlbumListItemWidget(onTap: (context) async {- await _createNewAlbumOnTap(context, filesCount);+ await _createNewAlbumOnTap(+ context,+ filesCount,+ initialAlbumName: widget.searchQuery,+ );},);}Future<void> _createNewAlbumOnTap(BuildContext context,- int filesCount,- ) async {+ int filesCount, {+ String initialAlbumName = "",+ }) async {if (filesCount > 0) {final result = await showTextInputDialog(context,title: context.strings.albumTitle,submitButtonLabel: context.strings.ok,hintText: context.strings.enterAlbumName,+ initialValue: initialAlbumName,onSubmit: (name) async {return await _nameAlbum(context, name);},diff --git a/mobile/apps/photos/lib/ui/collections/collection_action_sheet.dart b/mobile/apps/photos/lib/ui/collections/collection_action_sheet.dartindex 2e827efebd..8c4967f0cd 100644--- a/mobile/apps/photos/lib/ui/collections/collection_action_sheet.dart+++ b/mobile/apps/photos/lib/ui/collections/collection_action_sheet.dart@@ -302,9 +302,6 @@ class _CollectionActionSheetState extends State<CollectionActionSheet> {} else if (snapshot.hasData) {final collections = snapshot.data as List<Collection>;_removeIncomingCollections(collections);- final shouldShowCreateAlbum =- widget.showOptionToCreateNewAlbum && _searchQuery.isEmpty;-List<Collection> recentCollections = [];if (_searchQuery.isEmpty && !_showOnlyHiddenCollections) {recentCollections = CollectionsService.instance@@ -338,6 +335,10 @@ class _CollectionActionSheetState extends State<CollectionActionSheet> {).toList(): collections;+ final shouldShowCreateAlbum =+ widget.showOptionToCreateNewAlbum &&+ (_searchQuery.isEmpty ||+ (searchResults.isEmpty && sharedCollections.isEmpty));return LayoutBuilder(builder: (context, constraints) {return OverflowBox(