Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Hide favorite action for public links

ashil-pilota3ea1723dd42
diff --git a/mobile/apps/photos/changes/public-link-favorite-icon.md b/mobile/apps/photos/changes/public-link-favorite-icon.md
new file mode 100644
index 0000000000..bd45b896b4
--- /dev/null
+++ b/mobile/apps/photos/changes/public-link-favorite-icon.md
@@ -0,0 +1 @@
+- Removed the favorite action when viewing photos through public links.
diff --git a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
index 5b612c7245..7c815edd41 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/file_app_bar.dart
@@ -307,7 +307,10 @@ class FileAppBarState extends State<FileAppBar> {
),
);
}
- if (!isFileHidden && isFileUploaded && !widget.file.isTrash) {
+ if (!isFileHidden &&
+ isFileUploaded &&
+ !widget.file.isTrash &&
+ widget.galleryType != GalleryType.sharedPublicCollection) {
_actions.add(
Center(
child: FavoriteWidget(widget.file, iconSize: 24, tapTargetSize: 48),