1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-03-26 21:12:59 +02:00

All: Refresh folder order when a new folder is added or modified

This commit is contained in:
Laurent Cozic 2019-03-08 17:25:32 +00:00
parent de73d4baa7
commit 9bd62fd3d4
2 changed files with 5 additions and 3 deletions

View File

@ -310,6 +310,10 @@ class BaseApplication {
SearchEngine.instance().scheduleSyncTables();
}
if (this.hasGui() && ["FOLDER_UPDATE_ONE", "FOLDER_UPDATE_ALL"].indexOf(action.type) >= 0) {
refreshFolders = true;
}
if (action.type == 'FOLDER_SELECT' || action.type === 'FOLDER_DELETE' || action.type === 'FOLDER_AND_NOTE_SELECT' || (action.type === 'SEARCH_UPDATE' && newState.notesParentType === 'Folder')) {
Setting.setValue('activeFolderId', newState.selectedFolderId);
this.currentFolder_ = newState.selectedFolderId ? await Folder.load(newState.selectedFolderId) : null;

View File

@ -32,9 +32,7 @@ function installRule(markdownIt, mdOptions, ruleOptions) {
let js = ruleOptions.postMessageSyntax + "(" + JSON.stringify(href) + "); return false;";
if (hrefAttr.indexOf('#') === 0 && href.indexOf('#') === 0) js = ''; // If it's an internal anchor, don't add any JS since the webview is going to handle navigating to the right place
if (js) hrefAttr = '#';
let output = "<a data-from-md " + resourceIdAttr + " title='" + htmlentities(title) + "' href='" + hrefAttr + "' onclick='" + js + "'>" + icon;
console.info(output);
return output;
return "<a data-from-md " + resourceIdAttr + " title='" + htmlentities(title) + "' href='" + hrefAttr + "' onclick='" + js + "'>" + icon;
};
}