The first phase of my GSoC project has completed. I received an evaluation on my work from my mentor, feaneron. I am happy that the project is moving well. I hope to keep up with the work and continue this awesome journey and learn in the process.
So, let me come back to the project update. We have come a long way and I am happy to tell everyone that To Do can now load Todoist task lists and tasks. Although this work is still in progress and patch related to this change will be pushed probably by this week. So everyone waiting to use Todoist with To Do keep a watch on To Do repo for the update.
The major problem that I faced was synchronizing the tasks and task lists so that they are updated automatically. After discussion with my mentor, we have decided to sync tasks every hour, although this may change. I wanted the sync calls and functions updating the changes to be separate so that there is less friction between the code.
The current flow of Todoist plugin is:
All the phases shown in the flowchart, except the last part which is synchronizing the tasks, has been completed. The major problem with task synchronization is code repetition due to addition of update functions. After some thinking I decided to make the function that initially loads tasks to be good enough so that it can be also be used to update tasks. To achieve this I had to add a check if lists/tasks already exists using the id. So if suppose the list already exists, I just fetch the list from Hash Table using the id as key and make changes to it’s properties. This way the list gets updated and not created again if it already exists. The problem that still exists is with the “list-changed” signal which is not behaving as thought and I need to fix this.
I have a short video demonstration for the work in progress.
Feel free to drop suggestions and give your feedback.