From f0d9d42f1ae050eb558178d1601426b7dec8abe4 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Sat, 26 Aug 2023 21:36:40 +0200 Subject: fixed mod browser thinking it's done loading pkgs The mod browser before this pre-maturely thought it had loaded all the available packages, when in fact, it'd barely started. Now this is fixed, and you can scroll for quite some time before actually reaching the real end of the package list. --- src/app/js/browser.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/js/browser.js b/src/app/js/browser.js index fcbdc4f..f3b11c9 100644 --- a/src/app/js/browser.js +++ b/src/app/js/browser.js @@ -211,11 +211,11 @@ var Browser = { browserEntries.innerHTML = `
${lang('gui.browser.loading')}
`; } }, - endoflist: (isEnd) => { + endoflist: (is_end) => { let pkgs = []; let filtered = Browser.filters.getpkgs(); for (let i = 0; i < filtered.length; i++) { - if ([packagecount + i]) { + if (filtered[packagecount + i]) { pkgs.push(filtered[packagecount + i]); } else { break @@ -226,7 +226,7 @@ var Browser = { browserEntries.querySelector(".message").remove(); } - if (pkgs.length == 0 || isEnd) { + if (pkgs.length == 0 || is_end) { Browser.msg(`${lang('gui.browser.endoflist')}`); return } @@ -234,7 +234,7 @@ var Browser = { Browser.msg(``); loadmore.addEventListener("click", () => { Browser.loadpkgs(pkgs); - Browser.endoflist(pkgs); + Browser.endoflist(! pkgs.length); }) }, search: (string) => { -- cgit v1.2.3