You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Electron: Resolves #755: Added note properties dialog box to view and edit created time, updated time, source URL and geolocation
This commit is contained in:
@ -287,7 +287,7 @@ class BaseModel {
|
||||
}
|
||||
|
||||
// Remove fields that are not in the `fields` list, if provided.
|
||||
// Note that things like update_time, user_update_time will still
|
||||
// Note that things like update_time, user_updated_time will still
|
||||
// be part of the final list of fields if autoTimestamp is on.
|
||||
// id also will stay.
|
||||
if (!options.isNew && options.fields) {
|
||||
@ -314,6 +314,10 @@ class BaseModel {
|
||||
// The purpose of user_updated_time is to allow the user to manually set the time of a note (in which case
|
||||
// options.autoTimestamp will be `false`). However note that if the item is later changed, this timestamp
|
||||
// will be set again to the current time.
|
||||
//
|
||||
// The technique to modify user_updated_time while keeping updated_time current (so that sync can happen) is to
|
||||
// manually set updated_time when saving and to set autoTimestamp to false, for example:
|
||||
// Note.save({ id: "...", updated_time: Date.now(), user_updated_time: 1436342618000 }, { autoTimestamp: false })
|
||||
if (options.autoTimestamp && this.hasField('user_updated_time')) {
|
||||
o.user_updated_time = timeNow;
|
||||
}
|
||||
|
Reference in New Issue
Block a user