Skip to content

Commit

Permalink
Fix popular refresh toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
MxtOUT committed Jun 18, 2024
1 parent cf60993 commit 76140cf
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default class FPopularRefreshToggle extends Feature<CMarketHome> {
HTML.beforeEnd("#sellListings .market_tab_well_tabs",
`<div id="es_popular_refresh_toggle" class="btn_grey_black btn_small" data-tooltip-text="${L(__marketPopularItemsToggle)}"></div>`);

document.querySelector("#es_popular_refresh_toggle")?.addEventListener("click", () => {
this._toggleRefresh(!LocalStorage.get("popular_refresh"));
document.querySelector("#es_popular_refresh_toggle")?.addEventListener("click", async () => {
this._toggleRefresh(!(await LocalStorage.get("popular_refresh")));
});

this._toggleRefresh(await LocalStorage.get("popular_refresh") ?? false);
Expand Down

0 comments on commit 76140cf

Please sign in to comment.