You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-10 22:11:50 +02:00
This commit is contained in:
@@ -1043,9 +1043,9 @@ class NoteScreenComponent extends BaseScreenComponent<ComponentProps, State> imp
|
||||
};
|
||||
|
||||
private toggleIsTodo_onPress() {
|
||||
shared.toggleIsTodo_onPress(this);
|
||||
const newNote = shared.toggleIsTodo_onPress(this);
|
||||
|
||||
this.scheduleSave(this.state);
|
||||
this.scheduleSave({ ...this.state, note: newNote });
|
||||
}
|
||||
|
||||
private async share_onPress() {
|
||||
|
@@ -76,7 +76,7 @@ interface Shared {
|
||||
attachedResources?: (noteBody: string)=> Promise<any>;
|
||||
isModified?: (comp: BaseNoteScreenComponent)=> boolean;
|
||||
initState?: (comp: BaseNoteScreenComponent)=> Promise<void>;
|
||||
toggleIsTodo_onPress?: (comp: BaseNoteScreenComponent)=> void;
|
||||
toggleIsTodo_onPress?: (comp: BaseNoteScreenComponent)=> NoteEntity;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
toggleCheckboxRange?: (ipcMessage: string, noteBody: string)=> any;
|
||||
toggleCheckbox?: (ipcMessage: string, noteBody: string)=> string;
|
||||
@@ -360,9 +360,7 @@ shared.initState = async function(comp: BaseNoteScreenComponent) {
|
||||
};
|
||||
|
||||
shared.toggleIsTodo_onPress = function(comp: BaseNoteScreenComponent) {
|
||||
const newNote = Note.toggleIsTodo(comp.state.note);
|
||||
const newState = { note: newNote };
|
||||
comp.setState(newState);
|
||||
return Note.toggleIsTodo(comp.state.note);
|
||||
};
|
||||
|
||||
function toggleCheckboxLine(ipcMessage: string, noteBody: string) {
|
||||
|
Reference in New Issue
Block a user