Merge remote-tracking branch 'upstream/dev' into dev
Some checks are pending
Sync to Codeberg / Sync Codeberg and Github (push) Waiting to run
Test / Test (push) Waiting to run

This commit is contained in:
thororen1234 2025-01-28 01:17:34 +00:00
commit d1792ed569

View file

@ -236,6 +236,19 @@ export function migratePluginSettings(name: string, ...oldNames: string[]) {
} }
} }
export function migratePluginSetting(pluginName: string, oldSetting: string, newSetting: string) {
const { plugins } = SettingsStore.plain;
if (
plugins[pluginName][newSetting] != null ||
plugins[pluginName][oldSetting] == null
) return;
plugins[pluginName][newSetting] = plugins[pluginName][oldSetting];
delete plugins[pluginName][oldSetting];
SettingsStore.markAsChanged();
}
export function definePluginSettings< export function definePluginSettings<
Def extends SettingsDefinition, Def extends SettingsDefinition,
Checks extends SettingsChecks<Def>, Checks extends SettingsChecks<Def>,