diff --git a/lang/en.json b/lang/en.json index 2bca207c..c9754c1f 100644 --- a/lang/en.json +++ b/lang/en.json @@ -38,7 +38,7 @@ }, "load": { "notify": { - "AnimCoreUpdated": "AnimCore updated!", + "componentUpdated": "{component} updated!", "animationSetsUpdated": "Animation sets updated!" }, "error": { diff --git a/src/storage/AnimCore.ts b/src/storage/AnimCore.ts index 66366ea8..a3a80067 100644 --- a/src/storage/AnimCore.ts +++ b/src/storage/AnimCore.ts @@ -637,7 +637,7 @@ if (import.meta.hot) { if (newModule && newModule.AnimCore) { AnimCore = newModule.AnimCore; newModule.AnimCore.init(); - info('pf2e-graphics.load.notify.AnimCoreUpdated'); + info('pf2e-graphics.load.notify.componentUpdated', { component: 'AnimCore' }); } }); } diff --git a/src/view/ChatMessage/index.ts b/src/view/ChatMessage/index.ts index 9f25d3b2..6f909d01 100644 --- a/src/view/ChatMessage/index.ts +++ b/src/view/ChatMessage/index.ts @@ -82,7 +82,9 @@ const preDelete = Hooks.on('preDeleteChatMessage', (message) => { if (import.meta.hot) { // Prevents reloads - import.meta.hot.accept(); + import.meta.hot.accept((newModule) => { + if (newModule) info('pf2e-graphics.load.notify.componentUpdated', { component: 'view/ChatMessage' }); + }); // Disposes the previous hook import.meta.hot.dispose(() => { Hooks.off('preDeleteChatMessage', preDelete);