mirror of
https://github.com/Equicord/Equicord.git
synced 2025-01-30 19:23:29 -05:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
d1792ed569
1 changed files with 13 additions and 0 deletions
|
@ -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>,
|
||||||
|
|
Loading…
Reference in a new issue