Skip to content

Commit

Permalink
Desktop: Sync 15 seconds after changing a note
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Aug 4, 2023
1 parent 2329e32 commit 807384c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lib/BaseApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ export default class BaseApplication {
const newState = store.getState();

if (this.hasGui() && ['NOTE_UPDATE_ONE', 'NOTE_DELETE', 'FOLDER_UPDATE_ONE', 'FOLDER_DELETE'].indexOf(action.type) >= 0) {
if (!(await reg.syncTarget().syncStarted())) void reg.scheduleSync(1000, { syncSteps: ['update_remote', 'delete_remote'] });
if (!(await reg.syncTarget().syncStarted())) void reg.scheduleSync(15 * 1000, { syncSteps: ['update_remote', 'delete_remote'] });
SearchEngine.instance().scheduleSyncTables();
}

Expand Down

0 comments on commit 807384c

Please sign in to comment.