You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Desktop: Create new notes with minimum set of properties to prevent a few minor bugs
This commit is contained in:
@ -249,9 +249,24 @@ class Note extends BaseItem {
|
||||
});
|
||||
}
|
||||
|
||||
static previewFields() {
|
||||
// return ['id', 'title', 'body', 'is_todo', 'todo_completed', 'parent_id', 'updated_time', 'user_updated_time', 'user_created_time', 'encryption_applied'];
|
||||
return ['id', 'title', 'is_todo', 'todo_completed', 'parent_id', 'updated_time', 'user_updated_time', 'user_created_time', 'encryption_applied'];
|
||||
static previewFieldsWithDefaultValues(options = null) {
|
||||
return Note.defaultValues(this.previewFields(options));
|
||||
}
|
||||
|
||||
static previewFields(options = null) {
|
||||
options = Object.assign({
|
||||
includeTimestamps: true,
|
||||
}, options);
|
||||
|
||||
const output = ['id', 'title', 'is_todo', 'todo_completed', 'parent_id', 'encryption_applied'];
|
||||
|
||||
if (options.includeTimestamps) {
|
||||
output.push('updated_time');
|
||||
output.push('user_updated_time');
|
||||
output.push('user_created_time');
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
static previewFieldsSql(fields = null) {
|
||||
|
Reference in New Issue
Block a user