mirror of
https://github.com/bitwarden/desktop.git
synced 2024-10-05 05:08:14 +02: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();
|
var now = new Date();
|
||||||
needsSyncing(self, forceSync, function (needsSync) {
|
needsSyncing(self, forceSync, function (needsSync) {
|
||||||
if (!needsSync) {
|
if (!needsSync) {
|
||||||
|
self.setLastSync(now, function () {
|
||||||
self.syncCompleted(false);
|
self.syncCompleted(false);
|
||||||
callback(false);
|
callback(false);
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
syncVault(userId).then(function () {
|
syncVault(userId).then(function () {
|
||||||
return syncSettings(userId);
|
return syncSettings(userId);
|
||||||
}).then(function () {
|
}).then(function () {
|
||||||
self.setLastSync(new Date(), function () {
|
self.setLastSync(now, function () {
|
||||||
self.syncCompleted(true);
|
self.syncCompleted(true);
|
||||||
callback(true);
|
callback(true);
|
||||||
});
|
});
|
||||||
@ -61,8 +63,6 @@ function initSyncService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.getLastSync(function (lastSync) {
|
self.getLastSync(function (lastSync) {
|
||||||
var now = new Date();
|
|
||||||
|
|
||||||
self.apiService.getAccountRevisionDate(function (response) {
|
self.apiService.getAccountRevisionDate(function (response) {
|
||||||
var accountRevisionDate = new Date(response);
|
var accountRevisionDate = new Date(response);
|
||||||
if (lastSync && accountRevisionDate <= lastSync) {
|
if (lastSync && accountRevisionDate <= lastSync) {
|
||||||
|
Loading…
Reference in New Issue
Block a user