mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Fixed state when switching folder
This commit is contained in:
parent
2675a89dda
commit
cc92c29913
@ -67,8 +67,14 @@ class Application {
|
||||
}
|
||||
|
||||
switchCurrentFolder(folder) {
|
||||
this.logger().info('SWITCHING TO ' + (folder ? folder.id : ''));
|
||||
this.currentFolder_ = folder;
|
||||
Setting.setValue('activeFolderId', folder ? folder.id : '');
|
||||
|
||||
this.dispatch({
|
||||
type: 'FOLDERS_SELECT',
|
||||
folderId: folder ? folder.id : '',
|
||||
});
|
||||
}
|
||||
|
||||
async guessTypeAndLoadItem(pattern, options = null) {
|
||||
@ -464,6 +470,10 @@ class Application {
|
||||
return middleware;
|
||||
}
|
||||
|
||||
dispatch(action) {
|
||||
if (this.store()) return this.store().dispatch(action);
|
||||
}
|
||||
|
||||
async start() {
|
||||
let argv = process.argv;
|
||||
let startFlags = await this.handleStartFlags_(argv);
|
||||
|
@ -10,7 +10,7 @@ class FolderListWidget extends ListWidget {
|
||||
this.updateIndexFromSelectedFolderId_ = false;
|
||||
|
||||
this.itemRenderer = (item) => {
|
||||
return item.title;
|
||||
return item.title + ' ' + item.id;
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user