Skip to content

Annotations: add datetime_updated property#12963

Merged
hius07 merged 1 commit into
koreader:masterfrom
hius07:anno-datetime-updated
Dec 31, 2024
Merged

Annotations: add datetime_updated property#12963
hius07 merged 1 commit into
koreader:masterfrom
hius07:anno-datetime-updated

Conversation

@hius07

@hius07 hius07 commented Dec 30, 2024

Copy link
Copy Markdown
Member

Closes #12957.

(1) datetime_updated is not exposed to UI.
(2) datetime_updated is not exported.
(3) There is no sorting by date modified.
(4) "Latest bookmark" still means the last created bookmark.

(5) @noembryo I do not add datetime_updated to new annotations.
Old annotations don't have this field, in any case you need to do something like

local datetime = item.datetime_updated or item.datetime

so no difference whether it is nil or equals to datetime.


This change is Reviewable

@noembryo

noembryo commented Dec 30, 2024

Copy link
Copy Markdown
Contributor

I do not add datetime_updated to new annotations.
Old annotations don't have this field, in any case you need to do something like..

Do you mean that although that newly created annotations will get this key, annotations that are already created won't get it?
We're not talking about the old format annotations, right?
If so, then yes, this looks like a good way to do it, thanks.. 🙏

@hius07

hius07 commented Dec 30, 2024

Copy link
Copy Markdown
Member Author

Newly created annotation (in new format, of course) doesn't get the key on creation.
So, if datetime_updated is nil, use datetime.

@noembryo

Copy link
Copy Markdown
Contributor

A, OK. Thanks for the clarification.

@Frenzie Frenzie added this to the 2025.01 milestone Dec 30, 2024
@hius07 hius07 merged commit 04c0ee5 into koreader:master Dec 31, 2024
@hius07 hius07 deleted the anno-datetime-updated branch December 31, 2024 06:54
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FR: Save annotation "last update" timestamps in metadata.epub.lua

4 participants