fix(web): viewport reactivity, off-screen thumbhashes being rendered (#15435)

* viewport optimizations

* fade in

* async bitmap

* fast path for smaller date groups

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Mert
2025-02-21 07:38:12 +03:00
committed by GitHub
parent ac36effb45
commit 52f21fb331
8 changed files with 183 additions and 52 deletions
+2
View File
@@ -232,6 +232,7 @@ export class AssetStore {
albumAssets: Set<string> = new Set();
pendingScrollBucket: AssetBucket | undefined;
pendingScrollAssetId: string | undefined;
maxBucketAssets = 0;
listeners: BucketListener[] = [];
@@ -560,6 +561,7 @@ export class AssetStore {
bucket.assets = assets;
bucket.dateGroups = splitBucketIntoDateGroups(bucket, get(locale));
this.maxBucketAssets = Math.max(this.maxBucketAssets, assets.length);
this.updateGeometry(bucket, true);
this.timelineHeight = this.buckets.reduce((accumulator, b) => accumulator + b.bucketHeight, 0);
bucket.loaded();