1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-26 22:41:17 +02:00

Got RN working again

This commit is contained in:
Laurent Cozic
2017-07-05 22:29:00 +01:00
parent f0a8cbe95d
commit 8adb5a71c5
14 changed files with 80 additions and 144 deletions

View File

@@ -4,7 +4,6 @@ import { ListView, Text, TouchableHighlight, Switch, View } from 'react-native';
import { Log } from 'lib/log.js';
import { _ } from 'lib/locale.js';
import { Checkbox } from 'lib/components/checkbox.js';
import { NoteFolderService } from 'lib/services/note-folder-service.js';
import { Note } from 'lib/models/note.js';
class ItemListComponent extends Component {
@@ -33,14 +32,9 @@ class ItemListComponent extends Component {
});
}
todoCheckbox_change(itemId, checked) {
NoteFolderService.setField('note', itemId, 'todo_completed', checked);
// Note.load(itemId).then((oldNote) => {
// let newNote = Object.assign({}, oldNote);
// newNote.todo_completed = checked;
// return NoteFolderService.save('note', newNote, oldNote);
// });
async todoCheckbox_change(itemId, checked) {
let note = await Note.load(itemId);
await Note.save({ id: note.id, todo_completed: checked });
}
listView_itemPress(itemId) {}