Skip to content

Commit

Permalink
Fixed all apps hidden on devlisher pages.
Browse files Browse the repository at this point in the history
Fixed filters not working on devlisher pages.
  • Loading branch information
Bilge committed Jul 4, 2024
1 parent c8d75f4 commit 4dac865
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions assets/js/Filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 4dac865

Please sign in to comment.