mirror of
https://github.com/immich-app/immich.git
synced 2026-05-23 08:02:29 -04:00
feat(mobile): stack original + edited photo on ios
Detect an iOS edit, upload the unedited original, and stack the edited version on top of it. Reverting in Photos flips the stack cover back to the original and keeps the edits. Adds an optional stackParentId field to the asset upload on the server.
This commit is contained in:
@@ -76,6 +76,12 @@ export const isAssetChecksumConstraint = (error: unknown) => {
|
||||
return (error as PostgresError)?.constraint_name === 'UQ_assets_owner_checksum';
|
||||
};
|
||||
|
||||
export const STACK_PRIMARY_CONSTRAINT = 'stack_primaryAssetId_uq';
|
||||
|
||||
export const isStackPrimaryConstraint = (error: unknown) => {
|
||||
return (error as PostgresError)?.constraint_name === STACK_PRIMARY_CONSTRAINT;
|
||||
};
|
||||
|
||||
export function withDefaultVisibility<O>(qb: SelectQueryBuilder<DB, 'asset', O>) {
|
||||
return qb.where('asset.visibility', 'in', [sql.lit(AssetVisibility.Archive), sql.lit(AssetVisibility.Timeline)]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user