Skip to content

[mob][photos] fix add to shared album for copied files#10007

Open
AmanRajSinghMourya wants to merge 1 commit intomainfrom
fix/shared-album-copy-via-uncategorized
Open

[mob][photos] fix add to shared album for copied files#10007
AmanRajSinghMourya wants to merge 1 commit intomainfrom
fix/shared-album-copy-via-uncategorized

Conversation

@AmanRajSinghMourya
Copy link
Copy Markdown
Contributor

Description

Adding an already-uploaded photo from a shared album into another shared album fails when the acting user is a collaborator/admin but does not own the destination album.

The failure happens in apps/photos/lib/services/collections_service.dart:1987 because foreign-owned files go through _copyToCollection(...), and apps/photos/lib/services/collections_service.dart:2088 requires the destination collection to be
owned by the current user.

For foreign-owned files:

  • if the destination album is owned by the current user, behavior stays the
    same and uses the old direct copy flow
  • if the destination album is not owned by the current user but canAutoAdd(...) is allowed, the service now:
    1. copies those files into the user’s uncategorized album
    2. takes those newly user-owned copies and adds them to the destination album through the normal add flow

@AmanRajSinghMourya AmanRajSinghMourya changed the title [photos] fix add to shared album for copied files [mob][photos] fix add to shared album for copied files Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant