254a255,283 > ensureMetaData: function caldav_ensureMetaData() { > let self = this; > let refreshNeeded = false; > let getMetaListener = { > onGetResult: function meta_onGetResult(aCalendar, aStatus, aItemType, aDetail, aCount, aItems) { > for each (let item in aItems) { > if (!(item.id in self.mItemInfoCache)) { > let path = self.getItemLocationPath(item); > cal.LOG("Adding meta-data for cached item " + item.id); > self.mItemInfoCache[item.id] = { etag: null, > isNew: false, > locationPath: path, > isInboxItem: false}; > self.mHrefIndex[self.mLocationPath + path] = item.id; > refreshNeeded = true; > } > } > }, > onOperationComplete: function meta_onOperationComplete(aCalendar, aStatus, aOpType, aId, aDetail) { > if (refreshNeeded) { > // reseting the cached ctag forces an item refresh when > // safeRefresh is called later > self.mCtag = null; > } > } > }; > this.mOfflineStorage.getItems(calICalendar.ITEM_FILTER_ALL_ITEMS, > 0, null, null, getMetaListener); > }, 257,258c286,287 < var cacheIds = {}; < var cacheValues = {}; --- > let cacheIds = {}; > let cacheValues = {}; 262,266c291,293 < let needsResave = false; < let calendarProperties = null; < for (var count = 0; count < cacheIds.length; count++) { < var itemId = cacheIds[count]; < var itemData = cacheValues[count]; --- > for (let count = 0; count < cacheIds.length; count++) { > let itemId = cacheIds[count]; > let itemData = cacheValues[count]; 282,285c309,312 < var itemDataArray = itemData.split("\u001A"); < var etag = itemDataArray[0]; < var resourcePath = itemDataArray[1]; < var isInboxItem = itemDataArray[2]; --- > let itemDataArray = itemData.split("\u001A"); > let etag = itemDataArray[0]; > let resourcePath = itemDataArray[1]; > let isInboxItem = itemDataArray[2]; 288c315 < var locationPath = resourcePath --- > let locationPath = resourcePath 290c317 < var item = { etag: etag, --- > let item = { etag: etag, 297a325 > this.ensureMetaData();