decord/beta/source/modules/gateway/PostConnectionCallbackStore.tsx
2026-10-02 13:37:24 +00:00

39 lines
1.3 KiB
TypeScript

// Module ID: 5871
// Function ID: 5872
// Name: PostConnectionCallbackStore
// Dependencies: [5872, 5590, 585, 2]
// Exports: addPostConnectionCallback
// Module 5871 (PostConnectionCallbackStore)
import NewUserStore from "NewUserStore" /* 5872 */;
import GatewayConnectionStore from "GatewayConnectionStore" /* 5590 */;
import Dispatcher_mod from "Dispatcher" /* 585 */;
import size from "module_2" /* 2 */;
function processCallbacks() {
if (null == NewUserStore.getType()) {
let item = closure_2.forEach((item) => {
setImmediate(() => item());
});
closure_2 = [];
}
}
let closure_2 = [];
let Dispatcher = Dispatcher_mod;
const subscription = Dispatcher.subscribe("CONNECTION_OPEN", processCallbacks);
Dispatcher = Dispatcher_mod;
const subscription1 = Dispatcher.subscribe("CONNECTION_RESUMED", processCallbacks);
Dispatcher = Dispatcher_mod;
const subscription2 = Dispatcher.subscribe("NUF_COMPLETE", processCallbacks);
const result = size.fileFinishedImporting("modules/gateway/PostConnectionCallbackStore.tsx");
export const addPostConnectionCallback = function addPostConnectionCallback(arg0) {
if (GatewayConnectionStore.isConnectedOrOverlay()) {
if (null == NewUserStore.getType()) {
let closure_0 = arg0;
const _setImmediate = setImmediate;
setImmediate(() => item());
}
}
closure_2.push(arg0);
};