π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: Sort sharee-pinned collections first and show pin icon
Prateek Sunal358aaa7a48ae
diff --git a/mobile/apps/photos/lib/services/collections_service.dart b/mobile/apps/photos/lib/services/collections_service.dartindex a7002703e9..e5b154706b 100644--- a/mobile/apps/photos/lib/services/collections_service.dart+++ b/mobile/apps/photos/lib/services/collections_service.dart@@ -455,6 +455,12 @@ class CollectionsService {incoming.sort((first, second) {+ // Sharee-pinned collections should come first+ final firstPinned = first.hasShareePinned();+ final secondPinned = second.hasShareePinned();+ if (firstPinned && !secondPinned) return -1;+ if (!firstPinned && secondPinned) return 1;+int comparison;if (sortKey == AlbumSortKey.albumName) {comparison = compareAsciiLowerCaseNatural(diff --git a/mobile/apps/photos/lib/ui/collections/album/row_item.dart b/mobile/apps/photos/lib/ui/collections/album/row_item.dartindex 3c0be38d69..01cd3de6c7 100644--- a/mobile/apps/photos/lib/ui/collections/album/row_item.dart+++ b/mobile/apps/photos/lib/ui/collections/album/row_item.dart@@ -104,6 +104,9 @@ class AlbumRowItemWidget extends StatelessWidget {final bool isSelected =selectedAlbums?.isAlbumSelected(c) ?? false;final String heroTag = tagPrefix + thumbnail.tag;+ // Show pin icon for owner's pinned albums OR sharee's pinned albums+ final bool showPin =+ isOwner ? c.isPinned : c.hasShareePinned();final thumbnailWidget = ThumbnailWidget(thumbnail,shouldShowArchiveStatus: isOwner@@ -111,7 +114,7 @@ class AlbumRowItemWidget extends StatelessWidget {: c.hasShareeArchived(),showFavForAlbumOnly: true,shouldShowSyncStatus: false,- shouldShowPinIcon: isOwner && c.isPinned,+ shouldShowPinIcon: showPin,key: Key(heroTag),);return Hero(