71 lines
4.3 KiB
TypeScript
71 lines
4.3 KiB
TypeScript
/* Metro module 9285; source: modules/rtc/hooks/useIsSecureFramesKeyInconsistent.tsx; dependencies: [31, 4294, 4395, 566, 9275, 2] */
|
|
import RTCConnectionStore from '../../../stores/RTCConnectionStore.tsx'; /* Metro dependency 4294 */
|
|
import StreamRTCConnectionStore from '../../../stores/StreamRTCConnectionStore.tsx'; /* Metro dependency 4395 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as SecureFramesUtilsModule from '../SecureFramesUtils.tsx'; /* Metro dependency 9275 */
|
|
|
|
function _fun72634(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72634, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9471:6, offset: 0x01d4c457, size: 166 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const closure = function({userId}) {
|
|
return require(dependencyMap[3]).useStateFromStores([RTCConnectionStore, StreamRTCConnectionStore], _fun72636);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/rtc/hooks/useIsSecureFramesKeyInconsistent.tsx');
|
|
exports.useIsSecureFramesKeyInconsistent = closure;
|
|
exports.useAlertIfSecureFramesKeyInconsistent = useAlertIfSecureFramesKeyInconsistent;
|
|
function useIsSecureFramesKeyInconsistent({userId}) { // fn#72635, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9471:126, offset: 0x01d4c4fd, size: 79 bytes, params: 2, frame: 15
|
|
return (require(566) /* metro dependency 566: flux */).useStateFromStores([RTCConnectionStore,
|
|
StreamRTCConnectionStore], function() {
|
|
return require(dependencyMap[4]).getIsSecureFramesKeyInconsistent(userId, [RTCConnectionStore,
|
|
StreamRTCConnectionStore]);
|
|
});
|
|
function _fun72636() { // fn#72636, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9471:221, offset: 0x01d4c54c, size: 66 bytes, params: 1, frame: 15
|
|
return (SecureFramesUtilsModule).getIsSecureFramesKeyInconsistent(userId,
|
|
[RTCConnectionStore, StreamRTCConnectionStore]);
|
|
}
|
|
|
|
}
|
|
|
|
function useAlertIfSecureFramesKeyInconsistent({channelId, userId, nickname, onAlertOpen}) { // fn#72637, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9471:473, offset: 0x01d4c58e, size: 131 bytes, params: 2, frame: 19
|
|
const nickname2 = nickname;
|
|
const value2 = useIsSecureFramesKeyInconsistent({userId: userId});
|
|
const binding = nickname2;
|
|
const env0_5 = binding.useRef(null);
|
|
binding.useEffect(_fun72638, [channelId, value2, nickname, onAlertOpen, userId]);
|
|
function _fun72638() { // fn#72638, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9471:650, offset: 0x01d4c611, size: 122 bytes, params: 1, frame: 16
|
|
var clearTimeout;
|
|
var binding;
|
|
if (env0_4) {
|
|
if (env0_5.current == null) {
|
|
env0_5.current = global.setTimeout(function() {
|
|
onAlertOpen();
|
|
require(dependencyMap[4]).showSecureFramesKeyInconsistentAlert({userId: userId, channelId: channelId,
|
|
nickname: nickname});
|
|
}, 1000);
|
|
} else {
|
|
clearTimeout = global.clearTimeout;
|
|
binding = env0_5;
|
|
clearTimeout(binding.current);
|
|
binding.current = null;
|
|
}
|
|
} else {
|
|
clearTimeout = global.clearTimeout;
|
|
binding = env0_5;
|
|
clearTimeout(binding.current);
|
|
binding.current = null;
|
|
}
|
|
const current = env0_5.current;
|
|
return function() {
|
|
global.clearTimeout(current);
|
|
};
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun72634, 9285, [31, 4294, 4395, 566, 9275,
|
|
2]) /* metro module 9285, dependencies: [31, 4294, 4395, 566, 9275, 2] */;
|