@parhelia/localization 0.3.12816 → 0.3.12818
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
|
-
{"version":3,"file":"TranslationBatches.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationBatches.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkV1B,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"TranslationBatches.d.ts","sourceRoot":"","sources":["../../src/translation-center/TranslationBatches.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkV1B,wBAAgB,kBAAkB,sBAwnCjC;AAED,eAAO,MAAM,oCAAoC,8BAA8B,CAAC;AAEhF,wBAAgB,8BAA8B,sBA0Y7C"}
|
|
@@ -474,6 +474,17 @@ export function TranslationBatches() {
|
|
|
474
474
|
// refresh that brings the UI to its final state.
|
|
475
475
|
};
|
|
476
476
|
}, [editContext]);
|
|
477
|
+
// Websocket events are the fast path, but a short disconnect or a batch that
|
|
478
|
+
// completes before the editor transport finishes reconnecting must not leave
|
|
479
|
+
// this management view permanently stale. Reconcile while the panel is
|
|
480
|
+
// mounted; request ids above prevent an older poll from overwriting a newer
|
|
481
|
+
// socket-triggered reload.
|
|
482
|
+
useEffect(() => {
|
|
483
|
+
const reconciliationTimer = window.setInterval(() => {
|
|
484
|
+
debouncedReloadRef.current();
|
|
485
|
+
}, 10_000);
|
|
486
|
+
return () => window.clearInterval(reconciliationTimer);
|
|
487
|
+
}, []);
|
|
477
488
|
// Group by date. Filtering happens server-side, so we operate on `batches` directly.
|
|
478
489
|
const groupedBatches = useMemo(() => {
|
|
479
490
|
if (batches.length === 0)
|