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

Mobile: More rendering optimisations to make animations smoother and to allow typing fast on large notes

This commit is contained in:
Laurent Cozic
2019-07-12 19:36:12 +01:00
parent 981c97cca5
commit c2a80b12f0
5 changed files with 111 additions and 70 deletions

View File

@ -603,6 +603,17 @@ class Note extends BaseItem {
return note.is_todo && !note.todo_completed && note.todo_due >= time.unixMs() && !note.is_conflict;
}
static dueDateObject(note) {
if (!!note.is_todo && note.todo_due) {
if (!this.dueDateObjects_) this.dueDateObjects_ = {};
if (this.dueDateObjects_[note.todo_due]) return this.dueDateObjects_[note.todo_due];
this.dueDateObjects_[note.todo_due] = new Date(note.todo_due);
return this.dueDateObjects_[note.todo_due];
}
return null;
}
// Tells whether the conflict between the local and remote note can be ignored.
static mustHandleConflict(localNote, remoteNote) {
// That shouldn't happen so throw an exception