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

Various clean up and optimisations

This commit is contained in:
Laurent Cozic
2017-07-25 17:49:31 +00:00
parent 80ad3e0dfd
commit d47a02a24a
8 changed files with 102 additions and 110 deletions

View File

@@ -112,11 +112,13 @@ class NoteScreenComponent extends BaseScreenComponent {
note = await Note.load(this.props.noteId);
}
const folder = Folder.byId(this.props.folders, note.parent_id);
this.setState({
lastSavedNote: Object.assign({}, note),
note: note,
mode: mode,
folder: await Folder.load(note.parent_id),
folder: folder,
isLoading: false,
});
@@ -439,7 +441,7 @@ class NoteScreenComponent extends BaseScreenComponent {
let output = [];
for (let i = 0; i < this.props.folders.length; i++) {
let f = this.props.folders[i];
output.push({ label: f.title + ' ' + f.id, value: f.id });
output.push({ label: f.title, value: f.id });
}
return output;
}

View File

@@ -63,7 +63,7 @@ class NotesScreenComponent extends BaseScreenComponent {
return (
<View style={this.styles().screen}>
<ScreenHeader title={title} menuOptions={this.menuOptions()} />
<NoteList noItemMessage={_('There are currently no notes. Create one by clicking on the (+) button.')} style={{flex: 1}}/>
<NoteList style={{flex: 1}}/>
<ActionButton addFolderNoteButtons={addFolderNoteButtons} parentFolderId={this.props.selectedFolderId}></ActionButton>
<DialogBox ref={dialogbox => { this.dialogbox = dialogbox }}/>
</View>