Bug 1795797 - If a CalDAV sync response says there are more items, request the items. r=mkmelin

Differential Revision: https://phabricator.services.mozilla.com/D159553

--HG--
extra : rebase_source : 84e2233422c85041668a788e842920a96b8b2113
extra : amend_source : 3d7d2017e89d5df78bade151a44a5025db754d02
This commit is contained in:
Geoff Lankow 2022-10-18 12:31:02 +13:00
Родитель 41111b37e2
Коммит 2b62c5540e
1 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -569,7 +569,7 @@ class CalDavWebDavSyncHandler extends XMLResponseHandler {
return;
}
if (this.calendar.mWebdavSyncToken == null) {
if (this.calendar.mWebdavSyncToken == null && !this.additionalSyncNeeded) {
// null token means reset or first refresh indicating we did
// a full sync; remove local items that were not returned in this full
// sync
@ -597,6 +597,16 @@ class CalDavWebDavSyncHandler extends XMLResponseHandler {
this.calendar.mWebdavSyncToken = this.newSyncToken;
this.calendar.saveCalendarProperties();
cal.LOG("CalDAV: New webdav-sync Token: " + this.calendar.mWebdavSyncToken);
if (this.additionalSyncNeeded) {
let wds = new CalDavWebDavSyncHandler(
this.calendar,
this.baseUri,
this.changeLogListener
);
wds.doWebDAVSync();
return;
}
}
this.calendar.finalizeUpdatedItems(this.changeLogListener, this.baseUri);
}