@interopio/browser 3.5.8 → 3.5.9

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.
@@ -2824,6 +2824,9 @@
2824
2824
  const getAllPrefsResultDecoder = object$1({
2825
2825
  all: array$1(appPreferencesDecoder),
2826
2826
  });
2827
+ const subscriberRegisterConfigDecoder = object$1({
2828
+ interopId: nonEmptyStringDecoder,
2829
+ });
2827
2830
  const changePrefsDataDecoder = object$1({
2828
2831
  app: nonEmptyStringDecoder,
2829
2832
  data: object$1(),
@@ -6434,6 +6437,7 @@
6434
6437
  update: { name: "update", dataDecoder: changePrefsDataDecoder },
6435
6438
  prefsChanged: { name: "prefsChanged", dataDecoder: getPrefsResultDecoder },
6436
6439
  prefsHello: { name: "prefsHello", resultDecoder: prefsHelloSuccessDecoder },
6440
+ registerSubscriber: { name: "registerSubscriber", dataDecoder: subscriberRegisterConfigDecoder },
6437
6441
  };
6438
6442
 
6439
6443
  class PrefsController {
@@ -6444,6 +6448,8 @@
6444
6448
  platformAppName;
6445
6449
  registry = CallbackRegistryFactory$1();
6446
6450
  validNonExistentApps;
6451
+ signaledSubscription = false;
6452
+ interopId;
6447
6453
  handlePlatformShutdown() {
6448
6454
  this.registry.clear();
6449
6455
  }
@@ -6451,6 +6457,7 @@
6451
6457
  this.logger = coreGlue.logger.subLogger("prefs.controller.web");
6452
6458
  this.logger.trace("starting the web prefs controller");
6453
6459
  this.addOperationsExecutors();
6460
+ this.interopId = coreGlue.interop.instance.instance;
6454
6461
  this.bridge = ioc.bridge;
6455
6462
  this.config = ioc.config;
6456
6463
  this.appManagerController = ioc.appManagerController;
@@ -6547,6 +6554,14 @@
6547
6554
  if (typeof callback !== "function") {
6548
6555
  return ioError.raiseError("Cannot subscribe to prefs, because the provided callback is not a function!");
6549
6556
  }
6557
+ if (!this.signaledSubscription) {
6558
+ this.bridge.send("prefs", operations$1.registerSubscriber, { interopId: this.interopId }, undefined, { includeOperationCheck: true })
6559
+ .catch((error) => {
6560
+ this.logger.warn("Failed to register subscriber for prefs");
6561
+ this.logger.error(error);
6562
+ });
6563
+ this.signaledSubscription = true;
6564
+ }
6550
6565
  const subscriptionKey = this.getSubscriptionKey(verifiedApp);
6551
6566
  this.get(verifiedApp).then(callback);
6552
6567
  return this.registry.add(subscriptionKey, callback);
@@ -7044,7 +7059,7 @@
7044
7059
  }
7045
7060
  }
7046
7061
 
7047
- var version$1 = "3.5.8";
7062
+ var version$1 = "3.5.9";
7048
7063
 
7049
7064
  const createFactoryFunction = (coreFactoryFunction) => {
7050
7065
  let cachedApiPromise;