thesamim / TickTickSync

GNU General Public License v3.0
138 stars 8 forks source link

Pinned task's priority and emoji #176

Open johnyoonh opened 5 days ago

johnyoonh commented 5 days ago

It is more of a need for a feature.

To Reproduce Sync the tasks normally, and the pinned items will not be noted with 🔺

Expected behavior When the task is pinned, and the sortOrder value is negative, it should be treated as the pinned item, and the priority should be set to highest with 🔺 to be consistent with the Obsidian Task.

**Set up questions:

Desktop (please complete the following information):

thesamim commented 4 days ago

As of now, TickTickSync doesn't do anything with the sort order.

All sort orders are negative, so that's not a reliable indicator.

Looks like they've introduced a new attribute (new to me anyway) "pinnedTime", which is probably a good indicator. I could probably base priority management on that.

OTOH: I bet that's gonna cause issues if a pinned task is low priority and I force it to have a highest priority.

Will mull on it.

johnyoonh commented 1 day ago

Thank you for considering this feature! pinnedTime doesn't show up for me yet so it might be a beta feature?

https://api.ticktick.com/open/v1/project/{project}/data
https://api.ticktick.com/open/v1/project/{project}/task/{task}

Let me know if you used a specific header for it. On the other hand, I see only large negative numbers for the pined tasks.

thesamim commented 5 minutes ago

That's the V1 API. TickTickSync uses the V2 API.

To actually see the calls in action, you can go to Dev Tools in your browser and watch the network traffic.....