mirror of
https://github.com/immich-app/immich
synced 2026-08-22 13:13:05 +00:00
feat: improve asset-viewer next/prev perf and standardize preloading behavior (#24422)
Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
81f269e2a9
commit
78229baeab
24 changed files with 529 additions and 433 deletions
|
|
@ -50,4 +50,13 @@ export class InvocationTracker {
|
|||
isActive() {
|
||||
return this.invocationsStarted !== this.invocationsEnded;
|
||||
}
|
||||
|
||||
async invoke<T>(invocable: () => Promise<T>) {
|
||||
const invocation = this.startInvocation();
|
||||
try {
|
||||
return await invocable();
|
||||
} finally {
|
||||
invocation.endInvocation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue