From 8dd3acac71488df62b460be2d17969f82b841172 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 1 Sep 2022 15:10:45 +0530 Subject: [PATCH] do not show warning if already shared --- lib/ui/viewer/gallery/gallery_app_bar_widget.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/lib/ui/viewer/gallery/gallery_app_bar_widget.dart index cabd692d3..c2f39e14d 100644 --- a/lib/ui/viewer/gallery/gallery_app_bar_widget.dart +++ b/lib/ui/viewer/gallery/gallery_app_bar_widget.dart @@ -253,6 +253,10 @@ class _GalleryAppBarWidgetState extends State { collection == null) { return false; } + // collection is already shared + if (collection.sharees.isNotEmpty || collection.publicURLs.isNotEmpty) { + return false; + } final collectionIDsWithHiddenFiles = await FilesDB.instance.getCollectionIDsOfHiddenFiles( Configuration.instance.getUserID(),