changed the way config is saved after its compared

This commit is contained in:
Jack 2020-10-24 22:15:00 +01:00
parent 154c2f0587
commit 5100dea58d
2 changed files with 3 additions and 3 deletions

View file

@ -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);
}

View file

@ -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);