mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-24 08:12:24 +02:00
Fixed state handling issue when deleting note
This commit is contained in:
parent
218405503d
commit
3cb52a4107
@ -161,7 +161,7 @@ class AppGui {
|
||||
let note = noteList.currentItem;
|
||||
this.store_.dispatch({
|
||||
type: 'NOTES_SELECT',
|
||||
noteId: note ? note.id : 0,
|
||||
noteId: note ? note.id : null,
|
||||
});
|
||||
});
|
||||
this.rootWidget_.connect(noteList, (state) => {
|
||||
|
@ -594,10 +594,6 @@ class Application {
|
||||
if (!currentFolder) currentFolder = await Folder.defaultFolder();
|
||||
Setting.setValue('activeFolderId', currentFolder ? currentFolder.id : '');
|
||||
|
||||
setInterval(() => {
|
||||
this.logger().debug(Setting.value('activeFolderId'), this.store().getState().settings.activeFolderId, this.store().getState().selectedFolderId);
|
||||
}, 1000);
|
||||
|
||||
// If we have some arguments left at this point, it's a command
|
||||
// so execute it.
|
||||
if (argv.length) {
|
||||
|
@ -25,8 +25,9 @@ class NoteWidget extends TextWidget {
|
||||
async onWillRender() {
|
||||
if (!this.note_ && this.noteId_) {
|
||||
this.note_ = await Note.load(this.noteId_);
|
||||
this.text = this.note_.title + "\n\n" + this.note_.body;
|
||||
}
|
||||
|
||||
this.text = this.note_ ? this.note_.title + "\n\n" + this.note_.body : '';
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user