stream-chat-angular 2.12.2 → 2.12.3

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.
@@ -1 +1 @@
1
- export declare const version = "2.12.2";
1
+ export declare const version = "2.12.3";
@@ -353,7 +353,7 @@
353
353
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
354
354
  }
355
355
 
356
- var version = '2.12.2';
356
+ var version = '2.12.3';
357
357
 
358
358
  var NotificationService = /** @class */ (function () {
359
359
  function NotificationService() {
@@ -1472,12 +1472,14 @@
1472
1472
  '--white-smoke': '#13151b',
1473
1473
  '--white-snow': '#070a0d',
1474
1474
  };
1475
+ this.variablesToDelete = [];
1475
1476
  this.theme$.subscribe(function (theme) {
1476
1477
  var darkVariables = _this.customDarkThemeVariables
1477
1478
  ? Object.assign(Object.assign({}, _this.defaultDarkModeVariables), _this.customDarkThemeVariables) : _this.defaultDarkModeVariables;
1478
1479
  var lightVariables = _this.customLightThemeVariables
1479
1480
  ? _this.customLightThemeVariables
1480
1481
  : {};
1482
+ _this.variablesToDelete.forEach(function (variables) { return _this.deleteVariables(variables); });
1481
1483
  if (theme === 'dark') {
1482
1484
  _this.deleteVariables(lightVariables);
1483
1485
  _this.setVariables(darkVariables);
@@ -1494,8 +1496,13 @@
1494
1496
  },
1495
1497
  set: function (variables) {
1496
1498
  var prevVariables = this.customLightThemeVariables;
1497
- this.deleteVariables(prevVariables);
1499
+ if (prevVariables) {
1500
+ this.variablesToDelete.push(prevVariables);
1501
+ }
1498
1502
  this._customLightThemeVariables = variables;
1503
+ if (this.theme$.getValue() === 'light') {
1504
+ this.theme$.next('light');
1505
+ }
1499
1506
  },
1500
1507
  enumerable: false,
1501
1508
  configurable: true
@@ -1506,8 +1513,13 @@
1506
1513
  },
1507
1514
  set: function (variables) {
1508
1515
  var prevVariables = this.customDarkThemeVariables;
1509
- this.deleteVariables(prevVariables);
1516
+ if (prevVariables) {
1517
+ this.variablesToDelete.push(prevVariables);
1518
+ }
1510
1519
  this._customDarkThemeVariables = variables;
1520
+ if (this.theme$.getValue() === 'dark') {
1521
+ this.theme$.next('dark');
1522
+ }
1511
1523
  },
1512
1524
  enumerable: false,
1513
1525
  configurable: true