1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Saving/loading notes from Electron

This commit is contained in:
Laurent Cozic
2017-11-05 18:36:27 +00:00
parent 3de7534d1d
commit 100b98bff8
4 changed files with 75 additions and 17 deletions

View File

@ -42,7 +42,6 @@ class NoteScreenComponent extends BaseScreenComponent {
folder: null,
lastSavedNote: null,
isLoading: true,
resources: {},
titleTextInputHeight: 20,
};
@ -137,7 +136,11 @@ class NoteScreenComponent extends BaseScreenComponent {
await shared.initState(this);
shared.refreshNoteMetadata(this);
this.refreshNoteMetadata();
}
refreshNoteMetadata(force = null) {
return shared.refreshNoteMetadata(this, force);
}
componentWillUnmount() {

View File

@ -40,7 +40,7 @@ shared.saveNoteButton_press = async function(comp) {
note: note,
});
if (isNew) Note.updateGeolocation(note.id);
shared.refreshNoteMetadata(comp);
comp.refreshNoteMetadata();
}
shared.saveOneProperty = async function(comp, name, value) {
@ -111,7 +111,7 @@ shared.initState = async function(comp) {
shared.showMetadata_onPress = function(comp) {
comp.setState({ showNoteMetadata: !comp.state.showNoteMetadata });
shared.refreshNoteMetadata(comp, true);
comp.refreshNoteMetadata(true);
}
shared.toggleIsTodo_onPress = function(comp) {