Closed ricir closed 1 month ago
I can see the issue - fixing now :+1:
Fixed in 1.4.1, please let me know
OK it's working now! I'll need to rearrange the old lists in reverse order.
Excellent!
For your existing notes, you can put this in a Templater template or CustomJS action, assign it to a hotkey, and then hit the hotkey every time you come across a note with them in the wrong order:
<%*
app.fileManager.processFrontMatter(tp.config.target_file, frontmatter => {
frontmatter.modifiedDateTime.reverse()
})
-%>
Perfect!
I ended up in a slightly modified version of your proposed template, in order to also deal with files with dates not sorted for any reason:
<%*
app.fileManager.processFrontMatter(tp.config.target_file, frontmatter => {
frontmatter.modifiedDateTime.sort()
})
app.fileManager.processFrontMatter(tp.config.target_file, frontmatter => {
frontmatter.modifiedDateTime.reverse()
})
-%>
When using the new inverse sort order, the plugin keeps adding new modification dates (on top as required).