mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Desktop: Improved: When opening a note using Goto Anything, open all its parent notebooks too
This commit is contained in:
parent
5c069c38f5
commit
0e2bb5d784
@ -193,13 +193,25 @@ class Dialog extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
gotoItem(item) {
|
||||
async gotoItem(item) {
|
||||
this.props.dispatch({
|
||||
pluginName: PLUGIN_NAME,
|
||||
type: 'PLUGIN_DIALOG_SET',
|
||||
open: false,
|
||||
});
|
||||
|
||||
if (this.state.listType === BaseModel.TYPE_NOTE || this.state.listType === BaseModel.TYPE_FOLDER) {
|
||||
const folderPath = await Folder.folderPath(this.props.folders, item.parent_id);
|
||||
|
||||
for (const folder of folderPath) {
|
||||
this.props.dispatch({
|
||||
type: "FOLDER_SET_COLLAPSED",
|
||||
id: folder.id,
|
||||
collapsed: false,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (this.state.listType === BaseModel.TYPE_NOTE) {
|
||||
this.props.dispatch({
|
||||
type: "FOLDER_AND_NOTE_SELECT",
|
||||
|
@ -488,6 +488,12 @@ const reducer = (state = defaultState, action) => {
|
||||
newState.collapsedFolderIds = action.ids.slice();
|
||||
break;
|
||||
|
||||
case 'FOLDER_SET_COLLAPSED':
|
||||
|
||||
newState = Object.assign({}, state);
|
||||
folderSetCollapsed(state, action);
|
||||
break;
|
||||
|
||||
case 'TAG_UPDATE_ALL':
|
||||
|
||||
newState = Object.assign({}, state);
|
||||
|
Loading…
Reference in New Issue
Block a user