Synchronizing Tasks in Shuffle
As of the writing of this blog post there I’m finalizing the last part of how the new synchronization. The changes to Shuffle is that we introduce a hidden state for Tasks, Contexts and Projects. Hidden entities are in essence deleted, but the state is maintained even when it’s deleted.
This change allows the synchronization to ignore hidden projects, contexts and tasks.
For Contexts and Projects this is straight forward. However in Tracks, completed and hidden tasks are left out of the listing of tasks. This means that a task that is left out in Tracks is either deleted or completed.
Previously in Shuffle we just marked these tasks as completed. However now we can handle them properly. Below is a flowchart of how the suggested synchronization process of tasks works.
The flow-chart starts in a state where the tasks are downloaded from Tracks, then it’s compared to the entities in Shuffle by the chart.
The interesting part here is that the check if a task is completed or deleted is a remote check, which means it’s slower. Also any task not in Shuffle but in Tracks is naturally added to Shuffle.
I’d appreciate feedback on this, before I mark the task as Completed in Shuffle.