decord/source/__polyfill/07xxx/module_7207.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

40 lines
1.3 KiB
JavaScript

// Module ID: 7207
// Function ID: 7208
// Dependencies: [17]
// Exports: addListener, removeAllListeners
// Module 7207
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();
};