You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
All: Refresh folder order when a new folder is added or modified
This commit is contained in:
@@ -310,6 +310,10 @@ class BaseApplication {
|
|||||||
SearchEngine.instance().scheduleSyncTables();
|
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')) {
|
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);
|
Setting.setValue('activeFolderId', newState.selectedFolderId);
|
||||||
this.currentFolder_ = newState.selectedFolderId ? await Folder.load(newState.selectedFolderId) : null;
|
this.currentFolder_ = newState.selectedFolderId ? await Folder.load(newState.selectedFolderId) : null;
|
||||||
|
|||||||
@@ -32,9 +32,7 @@ function installRule(markdownIt, mdOptions, ruleOptions) {
|
|||||||
let js = ruleOptions.postMessageSyntax + "(" + JSON.stringify(href) + "); return false;";
|
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 (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 = '#';
|
if (js) hrefAttr = '#';
|
||||||
let output = "<a data-from-md " + resourceIdAttr + " title='" + htmlentities(title) + "' href='" + hrefAttr + "' onclick='" + js + "'>" + icon;
|
return "<a data-from-md " + resourceIdAttr + " title='" + htmlentities(title) + "' href='" + hrefAttr + "' onclick='" + js + "'>" + icon;
|
||||||
console.info(output);
|
|
||||||
return output;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user