mirror of
https://github.com/immich-app/immich.git
synced 2025-12-20 09:15:35 +03:00
fix: album asset sync must sync new assets in a shared album (#20655)
This commit is contained in:
@@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user