Closed mplorentz closed 5 years ago
Hey @mplorentz, thanks for the PR. lastModified
doesn't seem to be standard as part of a file. Were you able to test and confirm that this property was valid? Which OS and browser did you use? Can you try in multiple ones and see if they are also successful?
@mobitar oh, I didn't realize it wasn't standard. I tested it on macOS in Safari and Firefox, and the lastModified
value is read successfully and saved correctly in the sn-import-file.txt
. Should I add a fallback to the current date if lastModified
is null?
Yes, that would be good. It might just do that anyway if new Date(null)
returns current date, but better to test that.
When importing my plain text notes I noticed that they all came in with a created and modified dates set to today. This means that when I import them into Standard Notes really old notes show up at the top instead of the most recently edited ones.
This PR changes the plain text convertor to use each file's lastModified date in the
created_at
andupdated_at
fields, causing them to be sorted correctly in Standard Notes.Should I have committed my changes to
package-lock.json
? I'm not a node guy so I'm not really sure.