Skip to content

Commit

Permalink
Merge pull request #16 from mysurvive/Fix_Infinite_Loop
Browse files Browse the repository at this point in the history
Fix infinite loop
  • Loading branch information
mysurvive authored Jul 24, 2024
2 parents facea65 + e9456ce commit fb8bfb8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/module/so-inspired.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ Hooks.on("updateUser", (user) => {
});

Hooks.on("renderPlayerList", () => {
console.log("rendered");
if (game.settings.get("so-inspired", "showInspirationOnPlayerList"))
updatePlayerListInspo();
});
Expand Down Expand Up @@ -302,7 +303,6 @@ async function updatePlayerListInspo() {
.append(`<span class="inspiration-count">${inspoCount}</span>`);
}
}
updatePlayerList();
}

function createInspoFlag() {
Expand Down Expand Up @@ -399,6 +399,7 @@ async function addInspiration(user, _sheet) {
});
}
if (_sheet) _sheet.render(true);
updatePlayerList();
}

async function removeInspiration(user, _sheet) {
Expand All @@ -418,6 +419,7 @@ async function removeInspiration(user, _sheet) {
});
}
_sheet.render(true);
updatePlayerList();
}

function updateSheetForInspo(user) {
Expand Down

0 comments on commit fb8bfb8

Please sign in to comment.