mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
poll new revision date instead of full sync each time
This commit is contained in:
@@ -618,10 +618,11 @@ setInterval(fullSync, 5 * 60 * 1000); // check every 5 minutes
|
||||
var syncInternal = 6 * 60 * 60 * 1000; // 6 hours
|
||||
|
||||
function fullSync(override) {
|
||||
override = override || false;
|
||||
syncService.getLastSync(function (lastSync) {
|
||||
var now = new Date();
|
||||
if (override || !lastSync || (now - lastSync) >= syncInternal) {
|
||||
syncService.fullSync(function () { });
|
||||
syncService.fullSync(override, function () { });
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user