Enable sharing for fav collection

This commit is contained in:
Neeraj Gupta
2025-05-10 08:11:32 +05:30
parent bcf1a044cc
commit c4effd4ef4
2 changed files with 3 additions and 1 deletions

View File

@@ -312,6 +312,7 @@ extension GalleryAppBarExtn on GalleryType {
bool isSharable() {
if (this == GalleryType.ownedCollection ||
this == GalleryType.quickLink ||
this == GalleryType.favorite ||
this == GalleryType.hiddenOwnedCollection ||
this == GalleryType.sharedCollection) {
return true;

View File

@@ -817,9 +817,10 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
(galleryType != GalleryType.ownedCollection &&
galleryType != GalleryType.sharedCollection &&
galleryType != GalleryType.hiddenOwnedCollection &&
galleryType != GalleryType.favorite &&
!isQuickLink)) {
throw Exception(
"Cannot share empty collection of type $galleryType",
"Cannot share collection of type $galleryType",
);
}
if (Configuration.instance.getUserID() == widget.collection!.owner.id) {