diff --git a/js/index.js b/js/index.js index e9709fd..a0867ae 100644 --- a/js/index.js +++ b/js/index.js @@ -583,7 +583,7 @@ let chips = Array.from(document.querySelectorAll('.filter-nav .chip')).map(chip let activeSort = ''; - +let libraryShowAll = false; // perist whether user chose to view all apps // Update the sort state to match the current sort value function refreshSort(){ let sortContainer = document.querySelector("#librarycontainer .sort-nav"); @@ -596,6 +596,7 @@ function refreshLibrary(options) { options = options||{}; // options.dontChangeSearchBox : bool -> don't update the value in the search box // options.showAll : bool -> don't restrict the numbers of apps that are shown + if (options.showAll) libraryShowAll = true; // remember expansion choice let panelbody = document.querySelector("#librarycontainer .panel-body"); // Work out what we should be filtering, based on the URL let searchType = ""; // possible values: hash, chip, full, id @@ -717,7 +718,7 @@ function refreshLibrary(options) { } let viewMoreText = ""; - if (!options.showAll && visibleApps.length > Const.MAX_APPS_SHOWN) { + if (!libraryShowAll && visibleApps.length > Const.MAX_APPS_SHOWN) { viewMoreText = `