mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
setLastSync whenever account revision check determines that nothing has changed
This commit is contained in:
parent
a4f89c74ac
commit
ec08efdcd7
@ -29,15 +29,17 @@ function initSyncService() {
|
||||
var now = new Date();
|
||||
needsSyncing(self, forceSync, function (needsSync) {
|
||||
if (!needsSync) {
|
||||
self.syncCompleted(false);
|
||||
callback(false);
|
||||
self.setLastSync(now, function () {
|
||||
self.syncCompleted(false);
|
||||
callback(false);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
syncVault(userId).then(function () {
|
||||
return syncSettings(userId);
|
||||
}).then(function () {
|
||||
self.setLastSync(new Date(), function () {
|
||||
self.setLastSync(now, function () {
|
||||
self.syncCompleted(true);
|
||||
callback(true);
|
||||
});
|
||||
@ -61,8 +63,6 @@ function initSyncService() {
|
||||
}
|
||||
|
||||
self.getLastSync(function (lastSync) {
|
||||
var now = new Date();
|
||||
|
||||
self.apiService.getAccountRevisionDate(function (response) {
|
||||
var accountRevisionDate = new Date(response);
|
||||
if (lastSync && accountRevisionDate <= lastSync) {
|
||||
|
Loading…
Reference in New Issue
Block a user