[Fix] Release Fixes (#1530)

* Various fixes

* .

* .

* .
This commit is contained in:
WBHarry 2026-01-13 19:12:50 +01:00 committed by GitHub
parent 3c9ef75645
commit c958acabe6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 42 additions and 24 deletions

View file

@ -5,10 +5,7 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
super(options);
Hooks.on(socketEvent.Refresh, ({ refreshType }) => {
if (refreshType === RefreshType.Scene) {
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart);
this.render();
}
if (refreshType === RefreshType.Scene) this.render();
});
}
@ -42,7 +39,9 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
async _preRender(context, options) {
await super._preFirstRender(context, options);
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart);
if (!options.internalRefresh)
this.daggerheartFlag = new game.system.api.data.scenes.DHScene(this.document.flags.daggerheart);
}
_attachPartListeners(partId, htmlElement, options) {
@ -52,7 +51,7 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
case 'dh':
htmlElement.querySelector('#rangeMeasurementSetting')?.addEventListener('change', async event => {
this.daggerheartFlag.updateSource({ rangeMeasurement: { setting: event.target.value } });
this.render();
this.render({ internalRefresh: true });
});
const dragArea = htmlElement.querySelector('.scene-environments');
@ -69,7 +68,7 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
await this.daggerheartFlag.updateSource({
sceneEnvironments: [...this.daggerheartFlag.sceneEnvironments, data.uuid]
});
this.render();
this.render({ internalRefresh: true });
}
}
@ -92,7 +91,7 @@ export default class DhSceneConfigSettings extends foundry.applications.sheets.S
(_, index) => index !== Number.parseInt(button.dataset.index)
)
});
this.render();
this.render({ internalRefresh: true });
}
/** @override */