You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-04 21:53:18 +02:00
Sync when changing note or folder
This commit is contained in:
@ -106,7 +106,7 @@ reg.scheduleSync = async (delay = null) => {
|
||||
|
||||
reg.logger().info('Scheduling sync operation...');
|
||||
|
||||
reg.scheduleSyncId_ = setTimeout(async () => {
|
||||
const timeoutCallback = async () => {
|
||||
reg.scheduleSyncId_ = null;
|
||||
reg.logger().info('Doing scheduled sync');
|
||||
|
||||
@ -129,7 +129,13 @@ reg.scheduleSync = async (delay = null) => {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}, delay);
|
||||
};
|
||||
|
||||
if (delay === 0) {
|
||||
timeoutCallback();
|
||||
} else {
|
||||
reg.scheduleSyncId_ = setTimeout(timeoutCallback, delay);
|
||||
}
|
||||
}
|
||||
|
||||
reg.setDb = (v) => {
|
||||
|
Reference in New Issue
Block a user