mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 13:27:49 +08:00
changed the way config is saved after its compared
This commit is contained in:
parent
154c2f0587
commit
5100dea58d
2 changed files with 3 additions and 3 deletions
|
@ -305,7 +305,7 @@ function getAccountDataAndInit() {
|
|||
} else {
|
||||
if (config[key] != dbSnapshot.config[key]) {
|
||||
configsDifferent = true;
|
||||
console.log(`..config is different: ${config[key]} != ${dbSnapshot.config[key]}`);
|
||||
console.log(`..config is different ${key}: ${config[key]} != ${dbSnapshot.config[key]}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -319,7 +319,8 @@ function getAccountDataAndInit() {
|
|||
if (configsDifferent) {
|
||||
console.log('applying config from db');
|
||||
accountIconLoading(false);
|
||||
applyConfig(dbSnapshot.config);
|
||||
config = dbSnapshot.config;
|
||||
applyConfig(config);
|
||||
updateSettingsPage();
|
||||
saveConfigToCookie(true);
|
||||
}
|
||||
|
|
|
@ -84,7 +84,6 @@ async function saveConfigToCookie(noDbCheck = false) {
|
|||
configChangedBeforeDb = true;
|
||||
}
|
||||
// showNotification('saving to cookie',1000);
|
||||
if (config.freedomMode === null) config.freedomMode = false;
|
||||
let d = new Date();
|
||||
d.setFullYear(d.getFullYear() + 1);
|
||||
$.cookie("config", null);
|
||||
|
|
Loading…
Reference in a new issue