mirror of
https://github.com/immich-app/immich.git
synced 2025-12-23 15:38:24 -08:00
fix: back/forward navigation won't reset scroll in timeline (#22838)
* fix: back/forward navigation won't reset scroll in timeline Fixes a bug where navigating to/from the asser-viewer from timeline causes the scroll position to be reset. * Fix back after assetviewer next/prev navigation * Bug fix from review * review comments
This commit is contained in:
@@ -311,12 +311,14 @@ export class MonthGroup {
|
||||
if (viewerAsset) {
|
||||
if (!viewerAsset.position) {
|
||||
console.warn('No position for asset');
|
||||
break;
|
||||
return;
|
||||
}
|
||||
return this.top + group.top + viewerAsset.position.top + this.timelineManager.headerHeight;
|
||||
return {
|
||||
top: this.top + group.top + viewerAsset.position.top + this.timelineManager.headerHeight,
|
||||
height: viewerAsset.position.height,
|
||||
};
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
*assetsIterator(options?: { startDayGroup?: DayGroup; startAsset?: TimelineAsset; direction?: Direction }) {
|
||||
|
||||
@@ -234,7 +234,6 @@ export class TimelineManager extends VirtualScrollManager {
|
||||
await this.initTask.reset();
|
||||
await this.#init(options);
|
||||
this.updateViewportGeometry(false);
|
||||
this.#createScrubberMonths();
|
||||
}
|
||||
|
||||
async #init(options: TimelineManagerOptions) {
|
||||
|
||||
Reference in New Issue
Block a user