From c4effd4ef480f5e173f25717b533a0feb0b29f0c Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Sat, 10 May 2025 08:11:32 +0530 Subject: [PATCH] Enable sharing for fav collection --- mobile/lib/models/gallery_type.dart | 1 + mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/lib/models/gallery_type.dart b/mobile/lib/models/gallery_type.dart index a128757afe..7afaf0433a 100644 --- a/mobile/lib/models/gallery_type.dart +++ b/mobile/lib/models/gallery_type.dart @@ -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; diff --git a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart index 28b84194cb..3d250ddd3d 100644 --- a/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart +++ b/mobile/lib/ui/viewer/gallery/gallery_app_bar_widget.dart @@ -817,9 +817,10 @@ class _GalleryAppBarWidgetState extends State { (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) {