mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
fix: timeline scroll error handling (#21324)
This commit is contained in:
parent
d5fec0edab
commit
76eaee3657
1 changed files with 9 additions and 1 deletions
|
|
@ -419,14 +419,22 @@ export class TimelineManager {
|
||||||
if (!this.isInitialized) {
|
if (!this.isInitialized) {
|
||||||
await this.initTask.waitUntilCompletion();
|
await this.initTask.waitUntilCompletion();
|
||||||
}
|
}
|
||||||
|
|
||||||
let { monthGroup } = findMonthGroupForAssetUtil(this, id) ?? {};
|
let { monthGroup } = findMonthGroupForAssetUtil(this, id) ?? {};
|
||||||
if (monthGroup) {
|
if (monthGroup) {
|
||||||
return monthGroup;
|
return monthGroup;
|
||||||
}
|
}
|
||||||
const asset = toTimelineAsset(await getAssetInfo({ ...authManager.params, id }));
|
|
||||||
|
const response = await getAssetInfo({ ...authManager.params, id }).catch(() => null);
|
||||||
|
if (!response) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const asset = toTimelineAsset(response);
|
||||||
if (!asset || this.isExcluded(asset)) {
|
if (!asset || this.isExcluded(asset)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
monthGroup = await this.#loadMonthGroupAtTime(asset.localDateTime, { cancelable: false });
|
monthGroup = await this.#loadMonthGroupAtTime(asset.localDateTime, { cancelable: false });
|
||||||
if (monthGroup?.findAssetById({ id })) {
|
if (monthGroup?.findAssetById({ id })) {
|
||||||
return monthGroup;
|
return monthGroup;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue