You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-12 22:57:38 +02:00
Optimised saving notes
This commit is contained in:
@ -227,17 +227,12 @@ class Note extends BaseItem {
|
||||
if (isNew && !o.source) o.source = Setting.value('appName');
|
||||
if (isNew && !o.source_application) o.source_application = Setting.value('appId');
|
||||
|
||||
//return super.save(o, options);
|
||||
|
||||
return super.save(o, options).then((result) => {
|
||||
// 'result' could be a partial one at this point (if, for example, only one property of it was saved)
|
||||
// so call this.preview() so that the right fields are populated.
|
||||
return this.load(result.id);
|
||||
}).then((note) => {
|
||||
return super.save(o, options).then((note) => {
|
||||
this.dispatch({
|
||||
type: 'NOTES_UPDATE_ONE',
|
||||
note: note,
|
||||
});
|
||||
|
||||
return note;
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user