Skip to content

Commit

Permalink
Desktop, Mobile: Fixes #11317: Fix race condition which may cause dat…
Browse files Browse the repository at this point in the history
…a loss, particularly before or after pasting text in the note editor (#11334)

Co-authored-by: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com>
  • Loading branch information
mrjo118 and personalizedrefrigerator authored Nov 13, 2024
1 parent 24d02c5 commit 11b3347
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion packages/app-mobile/components/screens/Note.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ class NoteScreenComponent extends BaseScreenComponent<Props, State> implements B
Keyboard.dismiss();

this.setState({
note: { ...this.state.lastSavedNote },
mode: 'view',
});

Expand Down
2 changes: 1 addition & 1 deletion packages/lib/components/shared/note-screen-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ shared.saveNoteButton_press = async function(comp: BaseNoteScreenComponent, fold

// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
const newState: any = {
lastSavedNote: { ...note },
lastSavedNote: { ...note, ...savedNote },
note: note,
};

Expand Down

0 comments on commit 11b3347

Please sign in to comment.