diff options
author | 0neGal <mail@0negal.com> | 2023-08-26 21:36:40 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-08-26 21:36:40 +0200 |
commit | f0d9d42f1ae050eb558178d1601426b7dec8abe4 (patch) | |
tree | 750e181fc8ea551cf70b8445813673977e4cc227 /src | |
parent | 5aab63648392a54320d7704507c6ef4d358cc597 (diff) | |
download | Viper-f0d9d42f1ae050eb558178d1601426b7dec8abe4.tar.gz Viper-f0d9d42f1ae050eb558178d1601426b7dec8abe4.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/app/js/browser.js | 8 |
1 files 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 = `<div class="loading">${lang('gui.browser.loading')}</div>`; } }, - 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(`<button id="loadmore">${lang("gui.browser.loadmore")}</button>`); loadmore.addEventListener("click", () => { Browser.loadpkgs(pkgs); - Browser.endoflist(pkgs); + Browser.endoflist(! pkgs.length); }) }, search: (string) => { |