This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
// Metro module 12707 (f12708).
import Dispatcher from "../../Dispatcher";
class ActionBatcher {
static batchers = [];
constructor(a0, c19988_0, a2) {
this.action = null;
this.socket = a0;
this.shouldFlush = a2;
this.add = (a0) => {
this.action = c19988_0(this.action, a0);
};
ActionBatcher.batchers.push(this);
}
static flush(a0, a1) {
for (const batcher of ActionBatcher.batchers) {
const r28 = batcher;
if (batcher.action != null && (a0 == null || r28.shouldFlush(a0, a1))) {
r28.flush();
}
}
}
flush() {
const action = this.action;
this.action = null;
if (action != null) {
Dispatcher.dispatch(action).catch((a0) => this.socket.resetSocketAndClearCacheOnError({
error: a0,
action: action.type
}));
}
}
}
export default ActionBatcher;