D28436: [IncidenceTreeModel] Update UID if it was changed
Igor Poboiko
noreply at phabricator.kde.org
Fri Apr 3 15:28:23 BST 2020
poboiko added a comment.
In D28436#640410 <https://phabricator.kde.org/D28436#640410>, @winterz wrote:
> The code is ok. I admit I don't understand how this could happen. Google is changing the UID?
Thanks!
Basically, yes. Google provides own UIDs to address the task via its API.
It works as follows:
1. First, KOrganizer creates a task, and generates some default random UID for it. This task is added to the model, and to the Akonadi DB.
2. Then, Akonadi calls `itemAdded` callback for Google Resource, which sends this task to Google servers (via `KGAPI2::TaskCreateJob`).
3. When this job is done, Google returns us the UID of newly added task, which will be used to work with this task via its API.
4. Google Resource then changes the UID of the task to the new one explicitly (`item.setGid(task->uid()); new ItemModifyJob(item)`)
5. After that, the ETM gets notified of the result, and changes the UID of an item.
REPOSITORY
R76 PIM: Event Views
BRANCH
fix-id-change (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D28436
To: poboiko, dvratil, winterz
Cc: winterz, kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200403/c5b30f95/attachment.html>
More information about the kde-pim
mailing list