diff --git a/lib/ui/gallery_app_bar_widget.dart b/lib/ui/gallery_app_bar_widget.dart index d40189184..d3c3dd80c 100644 --- a/lib/ui/gallery_app_bar_widget.dart +++ b/lib/ui/gallery_app_bar_widget.dart @@ -151,23 +151,12 @@ class _GalleryAppBarWidgetState extends State { "Cannot create a collection of type" + widget.type.toString()); } } - final dialog = createProgressDialog(context, "Please wait..."); - await dialog.show(); - try { - final sharees = - await CollectionsService.instance.getSharees(widget.collection.id); - await dialog.hide(); - return showDialog( - context: context, - builder: (BuildContext context) { - return SharingDialog(collection, sharees); - }, - ); - } catch (e, s) { - _logger.severe(e, s); - await dialog.hide(); - showGenericErrorDialog(context); - } + return showDialog( + context: context, + builder: (BuildContext context) { + return SharingDialog(collection); + }, + ); } Future _createAlbum() async { diff --git a/lib/ui/share_collection_widget.dart b/lib/ui/share_collection_widget.dart index a3a09eb80..8821d83f8 100644 --- a/lib/ui/share_collection_widget.dart +++ b/lib/ui/share_collection_widget.dart @@ -19,9 +19,8 @@ import 'package:photos/utils/toast_util.dart'; class SharingDialog extends StatefulWidget { final Collection collection; - final List sharees; - SharingDialog(this.collection, this.sharees, {Key key}) : super(key: key); + SharingDialog(this.collection, {Key key}) : super(key: key); @override _SharingDialogState createState() => _SharingDialogState(); @@ -34,13 +33,17 @@ class _SharingDialogState extends State { @override Widget build(BuildContext context) { - _sharees = widget.sharees; + _sharees = widget.collection.sharees; final children = List(); if (!_showEntryField && (widget.collection == null || _sharees.length == 0)) { - children.add(Text("Click the + button to share this " + - Collection.typeToString(widget.collection.type) + - ".")); + if (widget.collection.type != CollectionType.favorites) { + children.add(Text("Click the + button to share this " + + Collection.typeToString(widget.collection.type) + + ".")); + } else { + children.add(Text("Click the + button to share your favorites.")); + } } else { for (final user in _sharees) { children.add(EmailItemWidget(widget.collection.id, user.email));