mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
sync status widget
This commit is contained in:
@@ -363,10 +363,16 @@ function setLastSyncedPull(entityChangeId) {
|
||||
}
|
||||
|
||||
function getLastSyncedPush() {
|
||||
return parseInt(optionService.getOption('lastSyncedPush'));
|
||||
const lastSyncedPush = parseInt(optionService.getOption('lastSyncedPush'));
|
||||
|
||||
ws.setLastSyncedPush(lastSyncedPush);
|
||||
|
||||
return lastSyncedPush;
|
||||
}
|
||||
|
||||
function setLastSyncedPush(entityChangeId) {
|
||||
ws.setLastSyncedPush(entityChangeId);
|
||||
|
||||
optionService.setOption('lastSyncedPush', entityChangeId);
|
||||
}
|
||||
|
||||
@@ -382,9 +388,12 @@ sqlInit.dbReady.then(() => {
|
||||
setInterval(cls.wrap(sync), 60000);
|
||||
|
||||
// kickoff initial sync immediately
|
||||
setTimeout(cls.wrap(sync), 3000);
|
||||
setTimeout(cls.wrap(sync), 5000);
|
||||
});
|
||||
|
||||
// called just so ws.setLastSyncedPush() is called
|
||||
getLastSyncedPush();
|
||||
|
||||
module.exports = {
|
||||
sync,
|
||||
login,
|
||||
|
||||
Reference in New Issue
Block a user