mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix: await both live photo and regular asset when applying edits
This commit is contained in:
@@ -127,8 +127,16 @@ export class EditManager {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Setup the websocket listener before sending the edit request
|
// Setup the websocket listener before sending the edit request
|
||||||
const editCompleted = waitForWebsocketEvent('AssetEditReadyV1', (event) => event.asset.id === assetId, 10_000);
|
const editEvents = [waitForWebsocketEvent('AssetEditReadyV1', (event) => event.asset.id === assetId, 10_000)];
|
||||||
|
|
||||||
if (this.currentAsset.livePhotoVideoId) {
|
if (this.currentAsset.livePhotoVideoId) {
|
||||||
|
editEvents.push(
|
||||||
|
waitForWebsocketEvent(
|
||||||
|
'AssetEditReadyV1',
|
||||||
|
(event) => event.asset.id === this.currentAsset!.livePhotoVideoId,
|
||||||
|
10_000,
|
||||||
|
),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
await (edits.length === 0
|
await (edits.length === 0
|
||||||
@@ -140,7 +148,7 @@ export class EditManager {
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
await editCompleted;
|
await Promise.all(editEvents);
|
||||||
|
|
||||||
eventManager.emit('AssetEditsApplied', assetId);
|
eventManager.emit('AssetEditsApplied', assetId);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user