Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,174 @@
|
||||
/* Metro module 10749; source: components_native/calls/CallPTTButton.tsx; dependencies: [57, 31, 1379, 4259, 4294, 661, 33, 4501, 697, 4000, 566, 10659, 10665, 10750, 5321, 4017, 1305, 1244, 2] */
|
||||
function _fun82650(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82650, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:6, offset: 0x01efd291, size: 568 bytes, params: 8, frame: 28
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
||||
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
|
||||
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
|
||||
const env0_8 = (require(661) /* metro dependency 661: Constants */).InputModes;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object = {};
|
||||
object.button = {margin: 13};
|
||||
const object3 = {};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
||||
object3.overflow = 'hidden';
|
||||
const colorUtilsModule = require(4000) /* metro dependency 4000: ColorUtils */;
|
||||
let hexWithOpacity = colorUtilsModule.hexWithOpacity;
|
||||
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
||||
object3.backgroundColor = Reflect.apply(hexWithOpacity, colorUtilsModule, [WHITE, 0.24]);
|
||||
object.container = object3;
|
||||
object.buttonBlur = {backgroundColor: 'transparent'};
|
||||
const value4 = colorUtilsModule;
|
||||
hexWithOpacity = value4.hexWithOpacity;
|
||||
const BLACK = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BLACK;
|
||||
object.buttonBlurPressed = {backgroundColor: Reflect.apply(hexWithOpacity, value4, [BLACK, 0.6])};
|
||||
object.textStyle = {fontSize: 16};
|
||||
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
||||
object.brandButtonContainer = {backgroundColor: BACKGROUND_BASE_LOW};
|
||||
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object]);
|
||||
const env0_12 = {code: 'function CallPTTButtonTsx1(){const{runOnJS,setDragging}=this.__closure;runOnJS(setDragging)(false);}'};
|
||||
const env0_13 = {code: 'function CallPTTButtonTsx2(){const{runOnJS,setDragging,setPressed,setIsSwipeToChatDisabled}=this.__closure;runOnJS(setDragging)(true);runOnJS(setPressed)(false);if(setIsSwipeToChatDisabled!=null){runOnJS(setIsSwipeToChatDisabled)(false);}}'};
|
||||
value = value.memo(_fun82651);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/calls/CallPTTButton.tsx');
|
||||
exports.default = value;
|
||||
exports.CallPTTButtonLooks = {BRAND: 'brand', BLUR: 'blur'};
|
||||
}
|
||||
|
||||
function _fun82651({look = env0_10.BRAND, style, sendCallback, stopCallback}) { // fn#82651, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1027, offset: 0x01efd4c9, size: 1019 bytes, params: 2, frame: 34
|
||||
var r0;
|
||||
var GestureDetector;
|
||||
var View;
|
||||
var object3;
|
||||
var Button;
|
||||
var intl;
|
||||
const env0_3 = undefined;
|
||||
let env0_4 = undefined;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
let object = [MediaEngineStore];
|
||||
const mode = Reflect.apply(useStateFromStores, fluxModule, [object, function() {
|
||||
return MediaEngineStore.getMode();
|
||||
}]);
|
||||
const channelId = fluxModule.useStateFromStores([RTCConnectionStore], function() {
|
||||
return RTCConnectionStore.getChannelId();
|
||||
});
|
||||
const value4 = fluxModule.useStateFromStores([ChannelStore], function() {
|
||||
return ChannelStore.getChannel(channelId);
|
||||
}, [channelId]);
|
||||
const value5 = (importDefault(10659) /* metro dependency 10659: useCanSpeakInChannel */)(channelId);
|
||||
const binding = env0_4;
|
||||
let useState = binding.useState;
|
||||
const value6 = Reflect.apply(useState, binding, [false]);
|
||||
const binding2 = env0_3;
|
||||
const value7 = binding2(value6, 2);
|
||||
const property = value7[0];
|
||||
const property2 = value7[1];
|
||||
env0_4 = property2;
|
||||
useState = binding.useState;
|
||||
const value8 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
||||
const property3 = value8[0];
|
||||
const property4 = value8[1];
|
||||
let r7 = value4?.isGuildStageVoice() && !value5;
|
||||
const value11 = env0_4.useRef(false);
|
||||
const setIsSwipeToChatDisabled = (require(10665) /* metro dependency 10665: VoiceChatModalContext */).useVoiceChatNavigationContext()?.setIsSwipeToChatDisabled;
|
||||
env0_4.useEffect(_fun82655, [value11, property, property3, sendCallback, stopCallback]);
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const value13 = Gesture.Pan();
|
||||
const onStart = value13.onStart;
|
||||
let closure = G_82656;
|
||||
closure.__closure = {runOnJS: (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS,
|
||||
setDragging: property4, setPressed: property2, setIsSwipeToChatDisabled: setIsSwipeToChatDisabled};
|
||||
closure.__workletHash = 10056118853836;
|
||||
closure.__initData = env0_13;
|
||||
const value14 = Reflect.apply(onStart, value13, [closure]);
|
||||
const onEnd = value14.onEnd;
|
||||
closure = F_82657;
|
||||
closure.__closure = {runOnJS: (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS,
|
||||
setDragging: property4};
|
||||
closure.__workletHash = 8439106360958;
|
||||
closure.__initData = env0_12;
|
||||
if (channelId == null) {
|
||||
r0 = null;
|
||||
} else if (InputModes.VOICE_ACTIVITY === mode) {
|
||||
r0 = null;
|
||||
} else if (r7) {
|
||||
r0 = null;
|
||||
} else {
|
||||
if (look === env0_10.BRAND) {
|
||||
r7 = [styles.brandButtonContainer];
|
||||
look = [styles.button, style];
|
||||
} else {
|
||||
look = property || property3 ? styles.buttonBlurPressed : styles.buttonBlur;
|
||||
r7 = [styles.button, styles.container, style];
|
||||
}
|
||||
GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
object = {gesture: Reflect.apply(onEnd, value14, [closure])};
|
||||
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
object3 = {style: r7};
|
||||
Button = (require(1305) /* metro dependency 1305: native */).Button;
|
||||
var buttonProps = {style: look, textStyle: styles.textStyle};
|
||||
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.Q8gkVL);
|
||||
buttonProps.onTouchStart = onTouchStart;
|
||||
buttonProps.onTouchEnd = onTouchEnd;
|
||||
buttonProps.darkenOnPress = true;
|
||||
r0 = <GestureDetector {...object}><View {...object3}><Button {...buttonProps} /></View></GestureDetector>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function _fun82655() { // fn#82655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1524, offset: 0x01efd904, size: 118 bytes, params: 1, frame: 13
|
||||
var value2;
|
||||
const r1 = env0_3 || env0_5;
|
||||
if (r1 !== env0_7.current) {
|
||||
value2 = environment.__proto__;
|
||||
(require(10750) /* metro dependency 10750: MediaEngineActionCreators */).setPushToTalkState(r1);
|
||||
if (r1) {
|
||||
if (sendCallback != null) {
|
||||
sendCallback();
|
||||
}
|
||||
} else if (stopCallback != null) {
|
||||
stopCallback();
|
||||
}
|
||||
}
|
||||
env0_7.current = r1;
|
||||
}
|
||||
|
||||
function G_82656() { // fn#82656, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1691, offset: 0x01efd97a, size: 127 bytes, params: 1, frame: 17
|
||||
let value = environment.__proto__;
|
||||
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_6)(true);
|
||||
(require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS(env0_4)(false);
|
||||
if (setIsSwipeToChatDisabled != null) {
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(setIsSwipeToChatDisabled)(false);
|
||||
}
|
||||
}
|
||||
|
||||
function F_82657() { // fn#82657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:1936, offset: 0x01efd9f9, size: 51 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value = value.runOnJS(env0_6);
|
||||
value(false);
|
||||
}
|
||||
|
||||
function onTouchStart() { // fn#82658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:2432, offset: 0x01efda2c, size: 48 bytes, params: 1, frame: 13
|
||||
env0_4(true);
|
||||
env0_6(false);
|
||||
if (setIsSwipeToChatDisabled != null) {
|
||||
setIsSwipeToChatDisabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
function onTouchEnd() { // fn#82659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10935:2482, offset: 0x01efda5c, size: 37 bytes, params: 1, frame: 13
|
||||
env0_4(false);
|
||||
if (setIsSwipeToChatDisabled != null) {
|
||||
setIsSwipeToChatDisabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user