Skip to content

Commit

Permalink
Filters fix
Browse files Browse the repository at this point in the history
Fix #33
  • Loading branch information
mclemente committed Feb 17, 2022
1 parent 7c28737 commit 1d71ceb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions module/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class PartyOverviewApp extends Application {
.flat(1)
.map((token) => token.actor);
}
if (!actors.length && !this.ignoreNoActors) return;

// remove duplicates if an actors has multiple tokens on scene
actors = actors.reduce((actors, actor) => (actors.map((a) => a.id).includes(actor.id) ? actors : [...actors, actor]), []);
Expand Down Expand Up @@ -137,9 +136,8 @@ class PartyOverviewApp extends Application {
super.activateListeners(html);
}

render(force, ignoreNoActors = false, options) {
render(force, options) {
this.rendering = true;
this.ignoreNoActors = ignoreNoActors;
super.render(force, options);
}

Expand Down
4 changes: 2 additions & 2 deletions party-overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Hooks.on("renderActorDirectory", (app, html, data) => {

let button = $(`<button class="party-overview-button ${currentSystemProvider.customCSS}"><i class="fas fa-users"></i> Party Overview</button>`);
button.on("click", (e) => {
partyOverview.render(true, true);
partyOverview.render(true);
});

$(html).find(".header-actions").prepend(button);
Expand Down Expand Up @@ -88,7 +88,7 @@ Hooks.on("deleteActor", (actor, options, userId) => {

Hooks.on("deleteToken", (token, options, userId) => {
if (partyOverview.rendering && token.actor?.hasPlayerOwner) {
partyOverview.render(false, true);
partyOverview.render(false);
}
});

Expand Down

0 comments on commit 1d71ceb

Please sign in to comment.