From 4dac8657cf5d1f198850619fc97eb77d05a68a14 Mon Sep 17 00:00:00 2001 From: Bilge Date: Thu, 4 Jul 2024 08:35:28 +0100 Subject: [PATCH] Fixed all apps hidden on devlisher pages. Fixed filters not working on devlisher pages. --- assets/js/Filter.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/js/Filter.ts b/assets/js/Filter.ts index a5b5c5acf28..bc8c035b45c 100644 --- a/assets/js/Filter.ts +++ b/assets/js/Filter.ts @@ -50,9 +50,14 @@ new class { let kept = 0; // Only filter when previously filtered or less than all checks enabled (optimization to speed loading). - if (this.filtersButton.getAttribute('data-filtered') || checkedChecks.length < this.checks.length) { + if (this.filtersButton.getAttribute('data-filtered') || checkedChecks.length < platformChecks.length + // Or hide owned apps checked. + || this.form['owned'].checked + ) { ranks.forEach(rank => { - let keep = checkedChecks.some(check => !!rank.querySelector('.platforms > .' + check.name)); + // Keep app if it has no platforms (e.g. devlisher pages). + let keep = !rank.querySelector('.platforms') || + checkedChecks.some(check => !!rank.querySelector('.platforms > .' + check.name)); if (this.form['owned'].checked) { keep &&= !rank.querySelector('a.owned');