decord/source/__polyfill/07xxx/module_7296.js
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

40 lines
1.3 KiB
JavaScript

// Module ID: 7296
// Function ID: 7297
// Dependencies: [17]
// Exports: addListener, removeAllListeners
// Module 7296
import get_ActivityIndicator from "module_17" /* 17 */;
const TurboModuleRegistry = get_ActivityIndicator.TurboModuleRegistry;
const enforcing = TurboModuleRegistry.getEnforcing("RNCClipboard");
const RNCClipboard_TEXT_CHANGED = "RNCClipboard_TEXT_CHANGED";
const nativeEventEmitter = new get_ActivityIndicator.NativeEventEmitter(enforcing);
const listenerCount = nativeEventEmitter.listenerCount;
let fn = listenerCount;
if (listenerCount) {
const listenerCount2 = nativeEventEmitter.listenerCount;
fn = listenerCount2.bind(nativeEventEmitter);
} else {
fn = (arg0) => nativeEventEmitter.listeners(arg0).length;
}
export default enforcing;
export const addListener = (arg0) => {
if (0 === fn(RNCClipboard_TEXT_CHANGED)) {
enforcing.setListener();
}
const addListenerResult = nativeEventEmitter.addListener(RNCClipboard_TEXT_CHANGED, arg0);
addListenerResult._remove = addListenerResult.remove;
addListenerResult.remove = function() {
this._remove();
if (0 === fn(RNCClipboard_TEXT_CHANGED)) {
enforcing.removeListener();
}
};
return addListenerResult;
};
export const removeAllListeners = () => {
nativeEventEmitter.removeAllListeners(RNCClipboard_TEXT_CHANGED);
enforcing.removeListener();
};