Move the tweak prevention into a helper function and rename the module hooks w/ compatibility code #26

Merged
Oliver merged 4 commits from feature/change-hook-name into main 2025-12-20 01:39:52 +00:00
Showing only changes of commit 3527286c7f - Show all commits

View file

@ -11,7 +11,9 @@ export function preventTweakRegistration(key, invasive = false) {
`The hook "${__ID__}.preventSetting" has been renamed "${__ID__}.registerTweak".`,
{ since: `v1.2.0`, until: `v2.0.0`, stack: false, once: true },
);
prevented &&= Hooks.call(`${__ID__}.preventSetting`);
if (prevented !== false) {
Oliver marked this conversation as resolved Outdated

This needs to be updated because it won't call this hook if oft.preRegisterTweak is allowing the tweak to be registered

This needs to be updated because it won't call this hook if `oft.preRegisterTweak` is allowing the tweak to be registered
prevented = Hooks.call(`${__ID__}.preventSetting`, key);
};
};
if (!prevented) {