From 76dfa5dcdfc22fbb3a6eebf243706a3fc10e493a Mon Sep 17 00:00:00 2001 From: kwaroran Date: Sun, 3 Nov 2024 23:27:19 +0900 Subject: [PATCH] Refactor moduleUpdate function to move lastModuleIds check to the end --- src/ts/process/modules.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ts/process/modules.ts b/src/ts/process/modules.ts index 2e7a42af..0aec3e2d 100644 --- a/src/ts/process/modules.ts +++ b/src/ts/process/modules.ts @@ -404,10 +404,6 @@ export function moduleUpdate(){ const m = getModules() const ids = m.map((m) => m.id).join('-') - if(lastModuleIds !== ids){ - ReloadGUIPointer.set(get(ReloadGUIPointer) + 1) - lastModuleIds = ids - } let moduleHideIcon = false let backgroundEmbedding = '' @@ -428,4 +424,9 @@ export function moduleUpdate(){ moduleBackgroundEmbedding.set(backgroundEmbedding) } HideIconStore.set(getCurrentCharacter()?.hideChatIcon || moduleHideIcon) + + if(lastModuleIds !== ids){ + ReloadGUIPointer.set(get(ReloadGUIPointer) + 1) + lastModuleIds = ids + } } \ No newline at end of file