Skip to content

Added support for X-APPLE-SORT-ORDER - #198

Merged
danirabbit merged 9 commits into
masterfrom
x-apple-sort-order
Mar 4, 2021
Merged

danirabbit merged 9 commits into
masterfrom
x-apple-sort-order

Conversation

@marbetschar

@marbetschar marbetschar commented Feb 23, 2021 •

Copy link
Copy Markdown
Member

This PR lays the foundation to enable us to manually sort tasks within a list.

Unfortunately the VTODO RFC does not support a "standard" way of sorting. However, this has been solved on Apple devices by introducing the custom field X-APPLE-SORT-ORDER.

If the custom field is not available, we calculate the sort value the same way Apple does: The number of seconds between the creation of the task and 20010101T000000Z (Cocoa/Webkit epoch).

See the Nextcloud Tasks app implementation of X-APPLE-SORT-ORDER for further details and a discussion about pros/cons:

@marbetschar
marbetschar requested a review from a team February 23, 2021 20:52
Comment thread src/Util.vala Resolved
Comment thread src/Util.vala Resolved
Comment thread src/Util.vala Resolved
Comment thread src/Util.vala Resolved
@marbetschar
marbetschar requested a review from danirabbit March 4, 2021 12:49
@danirabbit
danirabbit merged commit 73266be into master Mar 4, 2021
@danirabbit
danirabbit deleted the x-apple-sort-order branch March 4, 2021 20:49
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.

3 participants