π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] Handle received Favorites visibility
laurenspriem62830314031a
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/album_selection_action_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/album_selection_action_widget.dartindex b9cb2202bf..a6ffbe3a95 100644--- a/mobile/apps/photos/lib/ui/viewer/actions/album_selection_action_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/actions/album_selection_action_widget.dart@@ -375,12 +375,15 @@ class _AlbumSelectionActionWidgetStateFuture<void> _onHideOrUnHideClick() async {final userID = Configuration.instance.getUserID()!;+ final hasOwnedFavorites = widget.selectedAlbums.albums.any(+ (collection) => _isOwnedFavorite(collection, userID),+ );final collections = widget.selectedAlbums.albums- .where((c) => c.type != CollectionType.favorites)+ .where((collection) => !_isOwnedFavorite(collection, userID)).toList();if (collections.isEmpty) {- if (hasFavorites) {+ if (hasOwnedFavorites) {_showFavToast();}widget.selectedAlbums.clearAll();@@ -440,19 +443,23 @@ class _AlbumSelectionActionWidgetStateawait dialog.hide();}- if (hasFavorites) {+ if (hasOwnedFavorites) {_showFavToast();}widget.selectedAlbums.clearAll();}Future<void> _archiveClick() async {+ final userID = Configuration.instance.getUserID()!;+ final hasOwnedFavorites = widget.selectedAlbums.albums.any(+ (collection) => _isOwnedFavorite(collection, userID),+ );final collections = widget.selectedAlbums.albums- .where((c) => c.type != CollectionType.favorites)+ .where((collection) => !_isOwnedFavorite(collection, userID)).toList();if (collections.isEmpty) {- if (hasFavorites) {+ if (hasOwnedFavorites) {_showFavToast();}widget.selectedAlbums.clearAll();@@ -522,7 +529,7 @@ class _AlbumSelectionActionWidgetStateawait dialog.hide();}- if (hasFavorites) {+ if (hasOwnedFavorites) {_showFavToast();}if (mounted) {@@ -531,6 +538,11 @@ class _AlbumSelectionActionWidgetStatewidget.selectedAlbums.clearAll();}+ bool _isOwnedFavorite(Collection collection, int userID) {+ return collection.type == CollectionType.favorites &&+ collection.isOwner(userID);+ }+bool _usesShareeMetadata(Collection collection) {return widget.sectionType == UISectionType.incomingCollections ||widget.sectionType == UISectionType.homeCollections &&