1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Support for tags

This commit is contained in:
Laurent Cozic
2017-07-25 19:36:52 +01:00
parent e128077326
commit d5e39d153f
12 changed files with 274 additions and 65 deletions

View File

@ -66,21 +66,6 @@ class NoteListComponent extends Component {
});
}
async todoCheckbox_change(itemId, checked) {
let note = await Note.load(itemId);
await Note.save({ id: note.id, todo_completed: checked ? time.unixMs() : 0 });
}
listView_itemPress(noteId) {
this.props.dispatch({
type: 'NAV_GO',
routeName: 'Note',
noteId: noteId,
});
}
listView_itemLongPress(itemId) {}
render() {
// `enableEmptySections` is to fix this warning: https://github.com/FaridSafi/react-native-gifted-listview/issues/39
@ -89,11 +74,8 @@ class NoteListComponent extends Component {
<ListView
dataSource={this.state.dataSource}
renderRow={(note) => {
return <NoteItem
note={note}
onPress={(note) => this.listView_itemPress(note.id) }
onCheckboxChange={(note, checked) => this.todoCheckbox_change(note.id, checked) }
/> }}
return <NoteItem note={note}/>
}}
enableEmptySections={true}
/>
);