Skip to content

Commit

Permalink
Desktop: Quickly synchronise immediately after changing a note
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent22 committed Jul 11, 2023
1 parent 733c2dc commit 004d2a1
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 @@ -542,7 +542,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(30 * 1000, { syncSteps: ['update_remote', 'delete_remote'] });
if (!(await reg.syncTarget().syncStarted())) void reg.scheduleSync(1000, { syncSteps: ['update_remote', 'delete_remote'] });
SearchEngine.instance().scheduleSyncTables();
}

Expand Down

0 comments on commit 004d2a1

Please sign in to comment.