Skip to content

armgit / ente

Public Imported from GitHub
0

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

Move iCloud shared album guard conditions into _checkIfICloudSharedAlbum

ashilkned20688f2238
diff --git a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
index 969581d8ce..9769b927c1 100644
--- a/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/gallery/gallery_app_bar_widget.dart
@@ -150,14 +150,15 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
_appBarTitle = widget.title;
galleryType = widget.type;
- if (Platform.isIOS &&
- widget.type == GalleryType.localFolder &&
- widget.deviceCollection != null) {
- _checkIfICloudSharedAlbum();
- }
+ _checkIfICloudSharedAlbum();
}
Future<void> _checkIfICloudSharedAlbum() async {
+ if (!Platform.isIOS ||
+ widget.type != GalleryType.localFolder ||
+ widget.deviceCollection == null) {
+ return;
+ }
final sharedPathIDs =
await FilesService.instance.getICloudSharedAlbumPathIDs();
if (mounted && sharedPathIDs.contains(widget.deviceCollection!.id)) {