@sprucelabs/spruce-calendar-components 26.0.13 → 26.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -228,13 +228,16 @@ class CalendarEventManager {
|
|
|
228
228
|
var _a;
|
|
229
229
|
this.isRunningUpdateQueue = true;
|
|
230
230
|
let next;
|
|
231
|
-
|
|
231
|
+
const savedEvents = [];
|
|
232
232
|
while ((next = this.updateOperations.shift())) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
233
|
+
const e = await next.execute();
|
|
234
|
+
savedEvents.push(e);
|
|
235
|
+
}
|
|
236
|
+
const currentId = (_a = this.sm.getContext().event) === null || _a === void 0 ? void 0 : _a.id;
|
|
237
|
+
savedEvents.reverse();
|
|
238
|
+
const eventMatching = savedEvents.find((e) => e.id === currentId);
|
|
239
|
+
if (!this.hasPendingContextChanges && currentId === (eventMatching === null || eventMatching === void 0 ? void 0 : eventMatching.id)) {
|
|
240
|
+
await this.updateEventInContext(eventMatching);
|
|
238
241
|
}
|
|
239
242
|
this.isRunningUpdateQueue = false;
|
|
240
243
|
}
|
|
@@ -255,13 +255,16 @@ export default class CalendarEventManager {
|
|
|
255
255
|
return __awaiter(this, void 0, void 0, function* () {
|
|
256
256
|
this.isRunningUpdateQueue = true;
|
|
257
257
|
let next;
|
|
258
|
-
|
|
258
|
+
const savedEvents = [];
|
|
259
259
|
while ((next = this.updateOperations.shift())) {
|
|
260
|
-
|
|
260
|
+
const e = yield next.execute();
|
|
261
|
+
savedEvents.push(e);
|
|
261
262
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
const currentId = (_a = this.sm.getContext().event) === null || _a === void 0 ? void 0 : _a.id;
|
|
264
|
+
savedEvents.reverse();
|
|
265
|
+
const eventMatching = savedEvents.find((e) => e.id === currentId);
|
|
266
|
+
if (!this.hasPendingContextChanges && currentId === (eventMatching === null || eventMatching === void 0 ? void 0 : eventMatching.id)) {
|
|
267
|
+
yield this.updateEventInContext(eventMatching);
|
|
265
268
|
}
|
|
266
269
|
this.isRunningUpdateQueue = false;
|
|
267
270
|
});
|