making sure the buttons are ready

updating active buttons
This commit is contained in:
Miodec 2022-10-17 14:03:15 +02:00
parent 26487a2366
commit d99e4ca4c9
2 changed files with 5 additions and 4 deletions

View file

@ -675,8 +675,8 @@ $(".pageAccount .topFilters .button.toggleAdvancedFilters").on("click", () => {
);
});
export function appendButtons(): void {
Misc.getLanguageList().then((languages) => {
export async function appendButtons(): Promise<void> {
await Misc.getLanguageList().then((languages) => {
languages.forEach((language) => {
$(
".pageAccount .content .filterButtons .buttonsAndTitle.languages .buttons"
@ -692,7 +692,7 @@ export function appendButtons(): void {
$(
".pageAccount .content .filterButtons .buttonsAndTitle.funbox .buttons"
).append(`<div class="button" filter="none">none</div>`);
Misc.getFunboxList().then((funboxModes) => {
await Misc.getFunboxList().then((funboxModes) => {
funboxModes.forEach((funbox) => {
$(
".pageAccount .content .filterButtons .buttonsAndTitle.funbox .buttons"

View file

@ -1172,7 +1172,8 @@ export const page = new Page(
ResultFilters.removeButtons();
},
async () => {
ResultFilters.appendButtons();
await ResultFilters.appendButtons();
ResultFilters.updateActive();
if (DB.getSnapshot()?.results == undefined) {
$(".pageLoading .fill, .pageAccount .fill").css("width", "0%");
$(".pageAccount .content").addClass("hidden");