1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

All: Schedule sync after enabling or disabling encryption

This commit is contained in:
Laurent Cozic 2018-01-08 21:25:38 +01:00
parent bba2c68c6f
commit 7b9dc66121
3 changed files with 9 additions and 1 deletions

View File

@ -277,6 +277,10 @@ class BaseApplication {
type: 'MASTERKEY_REMOVE_NOT_LOADED',
ids: loadedMasterKeyIds,
});
// Schedule a sync operation so that items that need to be encrypted
// are sent to sync target.
reg.scheduleSync();
}
}

View File

@ -109,7 +109,7 @@ class Tag extends BaseItem {
for (let i = 0; i < tagTitles.length; i++) {
const title = tagTitles[i].trim().toLowerCase();
if (!title) continue;
let tag = await this.loadByField('title', title);
let tag = await this.loadByField('title', title, { caseInsensitive: true });
if (!tag) tag = await Tag.save({ title: title }, { userSideValidation: true });
await this.addNote(tag.id, noteId);
addedTitles.push(title);

View File

@ -97,6 +97,10 @@ const generalMiddleware = store => next => async (action) => {
type: 'MASTERKEY_REMOVE_NOT_LOADED',
ids: loadedMasterKeyIds,
});
// Schedule a sync operation so that items that need to be encrypted
// are sent to sync target.
reg.scheduleSync();
}
if (action.type == 'NAV_GO' && action.routeName == 'Notes') {