mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
Desktop: Resolves #2681: Clear provisional flag as soon as note is modified to avoid data loss
This commit is contained in:
parent
093fc811eb
commit
518af9dc0a
@ -513,6 +513,13 @@ class NoteTextComponent extends React.Component {
|
||||
}
|
||||
|
||||
scheduleSave() {
|
||||
if (this.state.note && this.props.provisionalNoteIds.includes(this.state.note.id)) {
|
||||
this.props.dispatch({
|
||||
type: 'NOTE_PROVISIONAL_FLAG_CLEAR',
|
||||
id: this.state.note.id,
|
||||
});
|
||||
}
|
||||
|
||||
if (this.scheduleSaveTimeout_) clearTimeout(this.scheduleSaveTimeout_);
|
||||
this.scheduleSaveTimeout_ = setTimeout(() => {
|
||||
this.saveIfNeeded();
|
||||
|
Loading…
Reference in New Issue
Block a user