mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Mobile: Fixes #10170, #8779: Fix shared data lost if Joplin is closed immediately after receiving a share (#10171)
This commit is contained in:
parent
b29bf7de5d
commit
0c6df3dd73
@ -587,7 +587,6 @@ class NoteScreenComponent extends BaseScreenComponent<Props, State> implements B
|
||||
private title_changeText(text: string) {
|
||||
shared.noteComponent_change(this, 'title', text);
|
||||
this.setState({ newAndNoTitleChangeNoteId: null });
|
||||
this.scheduleSave();
|
||||
}
|
||||
|
||||
private onPlainEditorTextChange = (text: string) => {
|
||||
@ -598,7 +597,6 @@ class NoteScreenComponent extends BaseScreenComponent<Props, State> implements B
|
||||
}
|
||||
|
||||
shared.noteComponent_change(this, 'body', text);
|
||||
this.scheduleSave();
|
||||
};
|
||||
|
||||
// Avoid saving immediately -- the NoteEditor's content isn't controlled by its props
|
||||
@ -607,7 +605,6 @@ class NoteScreenComponent extends BaseScreenComponent<Props, State> implements B
|
||||
// See https://github.com/laurent22/joplin/issues/10130
|
||||
private onMarkdownEditorTextChange = debounce((event: EditorChangeEvent) => {
|
||||
shared.noteComponent_change(this, 'body', event.value);
|
||||
this.scheduleSave();
|
||||
}, 100);
|
||||
|
||||
private onPlainEditorSelectionChange = (event: NativeSyntheticEvent<any>) => {
|
||||
|
@ -17,6 +17,7 @@ export interface BaseNoteScreenComponent {
|
||||
state: any;
|
||||
setState: (newState: any)=> void;
|
||||
|
||||
scheduleSave(): void;
|
||||
scheduleFocusUpdate(): void;
|
||||
attachFile(asset: any, fileType: any): void;
|
||||
lastLoadedNoteId_?: string;
|
||||
@ -185,6 +186,7 @@ shared.noteComponent_change = function(comp: BaseNoteScreenComponent, propName:
|
||||
newState.note = note;
|
||||
|
||||
comp.setState(newState);
|
||||
comp.scheduleSave();
|
||||
};
|
||||
|
||||
let resourceCache_: any = {};
|
||||
|
Loading…
Reference in New Issue
Block a user