feat: search results page (without keyboard actions)
fix: missing responsive calculation in UserPageLayout
This commit is contained in:
@@ -306,7 +306,7 @@ export class MonthGroup extends PhotostreamSegment {
|
||||
this.loader?.cancel();
|
||||
}
|
||||
|
||||
layout(noDefer: boolean) {
|
||||
layout(noDefer?: boolean) {
|
||||
layoutMonthGroup(this.timelineManager, this, noDefer);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { PhotostreamSegment } from '$lib/managers/photostream-manager/PhotostreamSegment.svelte';
|
||||
import type { CommonPosition } from '$lib/utils/layout-utils';
|
||||
|
||||
import type { DayGroup } from './day-group.svelte';
|
||||
@@ -5,15 +6,20 @@ import { calculateViewerAssetIntersecting } from './internal/intersection-suppor
|
||||
import type { TimelineAsset } from './types';
|
||||
|
||||
export class ViewerAsset {
|
||||
readonly #group: DayGroup;
|
||||
readonly #group: DayGroup | PhotostreamSegment;
|
||||
|
||||
intersecting = $derived.by(() => {
|
||||
if (!this.position) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const store = this.#group.monthGroup.timelineManager;
|
||||
const positionTop = this.#group.absoluteDayGroupTop + this.position.top;
|
||||
if ((this.#group as DayGroup).sortAssets) {
|
||||
const dayGroup = this.#group as DayGroup;
|
||||
const store = dayGroup.monthGroup.timelineManager;
|
||||
const positionTop = dayGroup.absoluteDayGroupTop + this.position.top;
|
||||
return calculateViewerAssetIntersecting(store, positionTop, this.position.height);
|
||||
}
|
||||
const store = (this.#group as PhotostreamSegment).timelineManager;
|
||||
const positionTop = this.position.top + (this.#group as PhotostreamSegment).top;
|
||||
|
||||
return calculateViewerAssetIntersecting(store, positionTop, this.position.height);
|
||||
});
|
||||
@@ -22,7 +28,7 @@ export class ViewerAsset {
|
||||
asset: TimelineAsset = <TimelineAsset>$state();
|
||||
id: string = $derived(this.asset.id);
|
||||
|
||||
constructor(group: DayGroup, asset: TimelineAsset) {
|
||||
constructor(group: DayGroup | PhotostreamSegment, asset: TimelineAsset) {
|
||||
this.#group = group;
|
||||
this.asset = asset;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user