mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: album asset sync must sync new assets in a shared album (#20655)
This commit is contained in:
parent
09a5963eee
commit
02381343ff
19 changed files with 928 additions and 453 deletions
|
|
@ -446,6 +446,16 @@ export async function* makeStream<T>(items: T[] = []): AsyncIterableIterator<T>
|
|||
}
|
||||
}
|
||||
|
||||
export const wait = (ms: number) => {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
export const wait = (ms: number): Promise<void> => {
|
||||
return new Promise((resolve) => {
|
||||
const target = performance.now() + ms;
|
||||
const checkDone = () => {
|
||||
if (performance.now() >= target) {
|
||||
resolve();
|
||||
} else {
|
||||
setTimeout(checkDone, 1); // Check again after 1ms
|
||||
}
|
||||
};
|
||||
setTimeout(checkDone, ms);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue