@sprucelabs/spruce-calendar-components 28.1.24 → 28.1.25

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.
@@ -10,6 +10,7 @@ export default class RootSkillViewController extends AbstractSkillViewController
10
10
  static shouldConfirmDrops: boolean;
11
11
  static shouldUpdateOnInterval: boolean;
12
12
  static refreshInterval: number;
13
+ static shouldCacheEvents: boolean;
13
14
  private calendarVc;
14
15
  private toolBeltVc;
15
16
  private person?;
@@ -411,9 +411,11 @@ class RootSkillViewController extends AbstractSkillViewController {
411
411
  });
412
412
  }
413
413
  optionallyLoadCachedEvents() {
414
- const events = this.getDevice().getCachedValue('calendarEvents');
415
- if (events) {
416
- this.events.addEvents(events);
414
+ if (RootSkillViewController.shouldCacheEvents) {
415
+ const events = this.getDevice().getCachedValue('calendarEvents');
416
+ if (events) {
417
+ this.events.addEvents(events);
418
+ }
417
419
  }
418
420
  }
419
421
  handleStateChange(options) {
@@ -538,7 +540,9 @@ class RootSkillViewController extends AbstractSkillViewController {
538
540
  });
539
541
  }
540
542
  cacheEvents(events) {
541
- this.getDevice().setCachedValue('calendarEvents', events);
543
+ if (RootSkillViewController.shouldCacheEvents) {
544
+ this.getDevice().setCachedValue('calendarEvents', events);
545
+ }
542
546
  }
543
547
  transitionToRoot() {
544
548
  return __awaiter(this, void 0, void 0, function* () {
@@ -588,4 +592,5 @@ RootSkillViewController.id = 'root';
588
592
  RootSkillViewController.shouldConfirmDrops = false;
589
593
  RootSkillViewController.shouldUpdateOnInterval = true;
590
594
  RootSkillViewController.refreshInterval = 1000 * 60;
595
+ RootSkillViewController.shouldCacheEvents = false;
591
596
  export default RootSkillViewController;
@@ -10,6 +10,7 @@ export default class RootSkillViewController extends AbstractSkillViewController
10
10
  static shouldConfirmDrops: boolean;
11
11
  static shouldUpdateOnInterval: boolean;
12
12
  static refreshInterval: number;
13
+ static shouldCacheEvents: boolean;
13
14
  private calendarVc;
14
15
  private toolBeltVc;
15
16
  private person?;
@@ -369,9 +369,11 @@ class RootSkillViewController extends heartwood_view_controllers_1.AbstractSkill
369
369
  await this.waitUntilDoneSaving();
370
370
  }
371
371
  optionallyLoadCachedEvents() {
372
- const events = this.getDevice().getCachedValue('calendarEvents');
373
- if (events) {
374
- this.events.addEvents(events);
372
+ if (RootSkillViewController.shouldCacheEvents) {
373
+ const events = this.getDevice().getCachedValue('calendarEvents');
374
+ if (events) {
375
+ this.events.addEvents(events);
376
+ }
375
377
  }
376
378
  }
377
379
  async handleStateChange(options) {
@@ -476,7 +478,9 @@ class RootSkillViewController extends heartwood_view_controllers_1.AbstractSkill
476
478
  }
477
479
  }
478
480
  cacheEvents(events) {
479
- this.getDevice().setCachedValue('calendarEvents', events);
481
+ if (RootSkillViewController.shouldCacheEvents) {
482
+ this.getDevice().setCachedValue('calendarEvents', events);
483
+ }
480
484
  }
481
485
  async transitionToRoot() {
482
486
  await this.sm.transitionTo(this.toolBeltStates.root);
@@ -522,4 +526,5 @@ RootSkillViewController.id = 'root';
522
526
  RootSkillViewController.shouldConfirmDrops = false;
523
527
  RootSkillViewController.shouldUpdateOnInterval = true;
524
528
  RootSkillViewController.refreshInterval = 1000 * 60;
529
+ RootSkillViewController.shouldCacheEvents = false;
525
530
  exports.default = RootSkillViewController;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-calendar-components",
3
3
  "description": "Calendar components for working with calendars and Sprucebot.",
4
- "version": "28.1.24",
4
+ "version": "28.1.25",
5
5
  "skill": {
6
6
  "namespace": "calendar"
7
7
  },