@xprem/control-center 3.1.2-beta2 → 3.1.2-beta4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xprem/control-center",
3
- "version": "3.1.2-beta2",
3
+ "version": "3.1.2-beta4",
4
4
  "description": "A branch picker that appears on builds whose channel allows surfing. JS-only, for xprem branch surfing.",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -1,7 +1,6 @@
1
1
  import { Component, ReactNode, useCallback, useEffect, useMemo, useState } from 'react';
2
2
  import {
3
3
  ActivityIndicator,
4
- InteractionManager,
5
4
  Modal,
6
5
  Pressable,
7
6
  ScrollView,
@@ -108,7 +107,7 @@ function ControlCenterPanel() {
108
107
  useEffect(() => {
109
108
  if (!config) return;
110
109
  let cancelled = false;
111
- const task = InteractionManager.runAfterInteractions(() => {
110
+ const handle = requestIdleCallback(() => {
112
111
  probeOnce(config)
113
112
  .then(result => {
114
113
  if (cancelled || result === null) return;
@@ -124,7 +123,7 @@ function ControlCenterPanel() {
124
123
  });
125
124
  return () => {
126
125
  cancelled = true;
127
- task.cancel();
126
+ cancelIdleCallback(handle);
128
127
  };
129
128
  }, [config]);
130
129