mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-08 05:03:39 +08:00
fixed #2709
This commit is contained in:
parent
2ed9374d8d
commit
1435c08d33
2 changed files with 6 additions and 4 deletions
|
|
@ -1902,10 +1902,8 @@ export function apply(
|
|||
}
|
||||
|
||||
export function reset(): void {
|
||||
config = {
|
||||
...DefaultConfig,
|
||||
};
|
||||
apply(config);
|
||||
ConfigEvent.dispatch("fullConfigChange");
|
||||
apply(DefaultConfig);
|
||||
saveFullConfigToLocalStorage();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1033,6 +1033,10 @@ export function setEventDisabled(value: boolean): void {
|
|||
configEventDisabled = value;
|
||||
}
|
||||
ConfigEvent.subscribe((eventKey) => {
|
||||
if (eventKey === "fullConfigChange") setEventDisabled(true);
|
||||
if (eventKey === "fullConfigChangeFinished") {
|
||||
setEventDisabled(false);
|
||||
}
|
||||
if (configEventDisabled || eventKey === "saveToLocalStorage") return;
|
||||
if (ActivePage.get() === "settings" && eventKey !== "theme") {
|
||||
update();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue