Fix profile corrupted cache

pull/1/head
yflory 4 years ago
parent 59ca7ac4d2
commit e41e6c39ce

@ -657,8 +657,16 @@ define([
var lm = APP.lm = Listmap.create(listmapConfig);
var onCorruptedCache = function () {
var sframeChan = common.getSframeChannel();
sframeChan.event("EV_PROFILE_CORRUPTED_CACHE");
};
init();
lm.proxy.on('ready', function () {
if (JSON.stringify(lm.proxy) === '{}') {
return void onCorruptedCache();
}
updateValues(lm.proxy);
UI.removeLoadingScreen();
common.mailbox.subscribe(["notifications"], {

@ -70,6 +70,12 @@ define([
Cryptpad.setAvatar(undefined, cb);
});
});
sframeChan.on('EV_PROFILE_CORRUPTED_CACHE', function () {
Utils.Cache.clearChannel(Utils.secret.channel, function () {
window.location.reload();
});
});
};
SFCommonO.start({
getSecrets: getSecrets,

Loading…
Cancel
Save