summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/PM/DataModel/Header.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/Header.js b/frontend/beta/js/Clipperz/PM/DataModel/Header.js
index 908d9f4..d577830 100644
--- a/frontend/beta/js/Clipperz/PM/DataModel/Header.js
+++ b/frontend/beta/js/Clipperz/PM/DataModel/Header.js
@@ -80,9 +80,10 @@ Clipperz.PM.DataModel.Header.prototype = MochiKit.Base.update(null, {
this._updatedSections = []
},
'hasSectionBeenUpdated': function(aSectionName) {
- return (this.updatedSections().join().indexOf(aSectionName) != -1);
+ return (this.updatedSections().join().indexOf(aSectionName) != -1)
+ || (this.serverDataVersion() != Clipperz.PM.Crypto.encryptingFunctions.currentVersion);
},
'cachedServerDataSection': function(aSectionName) {
return (this.hasSectionBeenUpdated(aSectionName)) ? {} : this.jsonEvaledServerData()[aSectionName];
@@ -411,8 +412,9 @@ Clipperz.PM.DataModel.Header.prototype = MochiKit.Base.update(null, {
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 4: "/* + res*/); return res;});
//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
deferredResult.addCallback(Clipperz.NotificationCenter.deferredNotification, this, 'updatedProgressState', 'connection_decryptingUserData');
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 5: "/* + res*/); return res;});
+//deferredResult.addBoth(function(res) {console.log("aKey: " + aKey); return res;});
//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});
deferredResult.addCallback(Clipperz.PM.Crypto.deferredDecrypt, this.user().passphrase(), data[aKey]['data'], this.serverDataVersion());
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("Header.extractDataWithKey 6: "/* + res*/); return res;});
//deferredResult.addErrback(function(res) {MochiKit.Logging.logDebug("ERROR: " + res); return res;});