1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Electron: Fixed issue with conflict folder and fixed sync tests

This commit is contained in:
Laurent Cozic
2017-11-12 18:57:59 +00:00
parent f8bcb56964
commit be77f15ef7
10 changed files with 41 additions and 15 deletions

View File

@ -136,8 +136,6 @@ class BaseApplication {
process.exit(code);
}
//async refreshNotes(parentType, parentId) {
//async refreshNotes(parentType, parentId) {
async refreshNotes(state) {
let parentType = state.notesParentType;
let parentId = null;
@ -245,6 +243,13 @@ class BaseApplication {
await this.refreshNotes(newState);
}
if (action.type === 'NOTE_UPDATE_ONE') {
// If there is a conflict, we refresh the folders so as to display "Conflicts" folder
if (action.note && action.note.is_conflict) {
await FoldersScreenUtils.refreshFolders();
}
}
if (this.hasGui() && action.type == 'SETTING_UPDATE_ONE' && action.key == 'sync.interval' || action.type == 'SETTING_UPDATE_ALL') {
reg.setupRecurrentSync();
}