You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-02 22:49:09 +02:00
All: Fixes #600: Improved resuming of long sync operations so that it doesn't needlessly re-download the items from the beginning
This commit is contained in:
@@ -100,6 +100,11 @@ reg.scheduleSync = async (delay = null, syncOptions = null) => {
|
||||
try {
|
||||
reg.logger().info("Starting scheduled sync");
|
||||
const options = Object.assign({}, syncOptions, { context: context });
|
||||
if (!options.saveContextHandler) {
|
||||
options.saveContextHandler = (newContext) => {
|
||||
Setting.setValue(contextKey, JSON.stringify(newContext));
|
||||
}
|
||||
}
|
||||
const newContext = await sync.start(options);
|
||||
Setting.setValue(contextKey, JSON.stringify(newContext));
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user