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.
This commit is contained in:
Harvey Tindall
2026-03-01 16:24:09 +00:00
parent 60bf89bc02
commit d7fdf29c7c
2 changed files with 2 additions and 1 deletions

View File

@@ -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<string, boolean>();

View File

@@ -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,