From d7fdf29c7cd0e58e6285821159371b0a2bf77428 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Sun, 1 Mar 2026 16:24:09 +0000 Subject: [PATCH] jf_activity: fix infinite load computeScrollInfo wasn't being called before the first detectScroll call, because there is no search functionality (somehow, i think). Fixed by calling it if _scroll.rowHeight is 0. --- ts/modules/accounts.ts | 1 + ts/modules/list.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/modules/accounts.ts b/ts/modules/accounts.ts index 2235937..6acd59b 100644 --- a/ts/modules/accounts.ts +++ b/ts/modules/accounts.ts @@ -2952,6 +2952,7 @@ class UserInfo extends PaginatedList { } this._search.setOrdering(Array.from(this.entries.keys()), "Date", true); + this.computeScrollInfo(); }, replaceWithNewItems: (resp: PaginatedDTO) => { let entriesOnDOM = new Map(); diff --git a/ts/modules/list.ts b/ts/modules/list.ts index f463f97..65760b1 100644 --- a/ts/modules/list.ts +++ b/ts/modules/list.ts @@ -464,7 +464,6 @@ export abstract class PaginatedList implements PageEventBindable { // Loads the next page. If "loadAll", all pages will be loaded until the last is reached. public abstract loadMore: (loadAll?: boolean, callback?: (resp?: PaginatedDTO) => void) => void; protected _loadMore = (loadAll: boolean = false, callback?: (resp: PaginatedDTO) => void) => { - console.trace("loading more"); this._c.loadMoreButtons.forEach((v) => (v.disabled = true)); const timeout = setTimeout(() => { this._c.loadMoreButtons.forEach((v) => (v.disabled = false)); @@ -530,6 +529,7 @@ export abstract class PaginatedList implements PageEventBindable { this._scroll.lastScrollY = scrollY; // If you've scrolled back up, do nothing if (scrollSpeed < 0) return; + if (this._scroll.rowHeight == 0) this.computeScrollInfo(); let endIdx = this.maximumItemsToRender(scrollY); // Throttling this function means we might not catch up in time if the user scrolls fast,