1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Sync in background for RN

This commit is contained in:
Laurent Cozic
2017-07-16 22:17:22 +01:00
parent 576cb345bb
commit 6673baee91
8 changed files with 138 additions and 31 deletions

View File

@@ -4,6 +4,7 @@ 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 { reg } from 'lib/registry.js';
import { Note } from 'lib/models/note.js';
import { time } from 'lib/time-utils.js';
@@ -36,6 +37,8 @@ class ItemListComponent 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 });
reg.scheduleSync();
}
listView_itemLongPress(itemId) {}