diff --git a/web/src/lib/components/timeline/Photostream.svelte b/web/src/lib/components/timeline/Photostream.svelte
index 7bb9b88081..b71308114a 100644
--- a/web/src/lib/components/timeline/Photostream.svelte
+++ b/web/src/lib/components/timeline/Photostream.svelte
@@ -230,7 +230,7 @@
(this.isInitialized = true),
() => (this.isInitialized = false),
@@ -58,13 +65,9 @@ export abstract class PhotostreamManager {
abstract get months(): PhotostreamSegment[];
setLayoutOptions({ headerHeight = 48, rowHeight = 235, gap = 12 }: TimelineManagerLayoutOptions) {
- let changed = false;
- changed ||= this.#setHeaderHeight(headerHeight);
- changed ||= this.#setGap(gap);
- changed ||= this.#setRowHeight(rowHeight);
- if (changed) {
- this.refreshLayout();
- }
+ this.#setHeaderHeight(headerHeight);
+ this.#setGap(gap);
+ this.#setRowHeight(rowHeight);
}
#setHeaderHeight(value: number) {
@@ -208,17 +211,6 @@ export abstract class PhotostreamManager {
this.updateIntersections();
}
- createLayoutOptions() {
- const viewportWidth = this.viewportWidth;
-
- return {
- spacing: 2,
- heightTolerance: 0.15,
- rowHeight: this.#rowHeight,
- rowWidth: Math.floor(viewportWidth),
- };
- }
-
async loadSegment(identifier: SegmentIdentifier, options?: { cancelable: boolean }): Promise {
let cancelable = true;
if (options) {
@@ -253,13 +245,6 @@ export abstract class PhotostreamManager {
return Promise.resolve(void 0);
}
- refreshLayout() {
- for (const month of this.months) {
- updateGeometry(this, month, { invalidateHeight: true });
- }
- this.updateIntersections();
- }
-
getMaxScrollPercent() {
const totalHeight = this.timelineHeight + this.bottomSectionHeight + this.topSectionHeight;
return (totalHeight - this.viewportHeight) / totalHeight;
diff --git a/web/src/lib/managers/searchresults-manager/SearchResultsSegment.svelte.ts b/web/src/lib/managers/searchresults-manager/SearchResultsSegment.svelte.ts
index 7282c250bd..7f63a9884b 100644
--- a/web/src/lib/managers/searchresults-manager/SearchResultsSegment.svelte.ts
+++ b/web/src/lib/managers/searchresults-manager/SearchResultsSegment.svelte.ts
@@ -75,7 +75,7 @@ export class SearchResultsSegment extends PhotostreamSegment {
layout(): void {
const timelineAssets = this.#viewerAssets.map((viewerAsset) => viewerAsset.asset);
- const layoutOptions = this.timelineManager.createLayoutOptions();
+ const layoutOptions = this.timelineManager.layoutOptions;
const geometry = getJustifiedLayoutFromAssets(timelineAssets, layoutOptions);
this.height = timelineAssets.length === 0 ? 0 : geometry.containerHeight + this.timelineManager.headerHeight;
diff --git a/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts b/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts
index 6b11b8800d..187a1c7b17 100644
--- a/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts
+++ b/web/src/lib/managers/timeline-manager/internal/layout-support.svelte.ts
@@ -34,7 +34,7 @@ export function layoutMonthGroup(timelineManager: TimelineManager, month: MonthG
let dayGroupRow = 0;
let dayGroupCol = 0;
- const options = timelineManager.createLayoutOptions();
+ const options = timelineManager.layoutOptions;
for (const dayGroup of month.dayGroups) {
dayGroup.layout(options, noDefer);