Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,150 @@
|
||||
/* Metro module 15428; source: modules/soundboard/native/SoundboardSoundPreviewActionSheet.tsx; dependencies: [29, 31, 27, 1878, 4613, 661, 33, 4501, 697, 477, 566, 6771, 6944, 6951, 6639, 4583, 6805, 6739, 11508, 4573, 4578, 8633, 8635, 1244, 8146, 4017, 2] */
|
||||
function _fun118030(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:6, offset: 0x024c927c, size: 641 bytes, params: 8, frame: 25
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const env0_3 = ['style'];
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const value = undefined;
|
||||
const env0_4 = importDefault(29) /* metro dependency 29 */;
|
||||
const env0_5 = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value2.View;
|
||||
const env0_7 = value2.Image;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const soundboardStore = importDefault(4613) /* metro dependency 4613: SoundboardStore */;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).AnalyticsObjects;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value3.jsx;
|
||||
const env0_12 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.emoji = {'marginTop': null, 'width': 64, 'height': 64, 'alignSelf': 'center', marginTop: PX_16};
|
||||
object2.emojiFastImage = {'width': 128, 'height': 128};
|
||||
const platformUtilsModule = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
object2.emojiText = {fontSize: platformUtilsModule.isIOS() ? 60 : value, lineHeight: 74};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.text = {marginTop: PX_16, alignSelf: 'center'};
|
||||
const object3 = {};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3.gap = PX_8;
|
||||
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
||||
object3.marginTop = PX_24;
|
||||
object2.buttonContainer = object3;
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object2.star = {'width': 16, 'height': 16, tintColor: TEXT_DEFAULT};
|
||||
const object4 = {'borderColor': 'transparent', 'borderWidth': 1, 'borderRadius': null, 'pointerEvents': 'none'};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
copyDataProperties(object4, StyleSheet.absoluteFillObject, undefined);
|
||||
object2.border = object4;
|
||||
const TEXT_FEEDBACK_POSITIVE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_FEEDBACK_POSITIVE;
|
||||
object2.borderPlaying = {borderColor: TEXT_FEEDBACK_POSITIVE};
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/soundboard/native/SoundboardSoundPreviewActionSheet.tsx');
|
||||
exports.default = SoundboardSoundPreviewActionSheet;
|
||||
return value;
|
||||
}
|
||||
|
||||
function SoundboardSoundPreviewActionSheet({channelId, sound}) { // fn#118031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:943, offset: 0x024c94fd, size: 1057 bytes, params: 2, frame: 38
|
||||
const styles = useStyles();
|
||||
const env0_2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun118032);
|
||||
const analyticsLocations = (importDefault(6771) /* metro dependency 6771: useAnalyticsLocations */)().analyticsLocations;
|
||||
const env0_3 = analyticsLocations;
|
||||
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([SoundboardStore],
|
||||
_fun118033);
|
||||
const isPlayingSound = value2.isPlayingSound;
|
||||
const env0_4 = isPlayingSound;
|
||||
const isFavorite = value2.isFavorite;
|
||||
const binding = isFavorite;
|
||||
const value3 = binding.useCallback(_fun118034, [isFavorite, sound, analyticsLocations]);
|
||||
const value4 = binding.useCallback(_fun118035, [channelId, sound, isPlayingSound]);
|
||||
const value5 = (require(4583) /* metro dependency 4583: ButtonHooksNative */).useButtonPressAnimationProps();
|
||||
const style = value5.style;
|
||||
const value6 = env0_4(value5, env0_3);
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const items3 = [((Component) => <Component fastImageStyle={[styles.emoji,
|
||||
styles.emojiFastImage]} textEmojiStyle={[styles.emoji,
|
||||
styles.emojiText]} src={(importDefault(11508) /* metro dependency 11508: getSoundboardEmojiUrl */)(sound,
|
||||
64)} name={sound.emojiName ?? ''} />)(importDefault(6739) /* metro dependency 6739: Emoji */)];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items3[1] = <Text style={styles.text} variant="heading-lg/extrabold">{sound.name}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
const buttonProps2 = {variant: 'primary',
|
||||
icon: ((Component) => <Component style={styles.star} />)(isFavorite ? (require(8633) /* metro dependency 8633: StarIcon */).StarIcon : (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon)};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
let string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
buttonProps2.text = isFavorite ? Reflect.apply(string, intl, [t.aBUcp3]) : Reflect.apply(string, intl, [t.yZFibY]);
|
||||
buttonProps2.onPress = value3;
|
||||
const button = <Button {...buttonProps2} />;
|
||||
const buttonProps = {...value6};
|
||||
buttonProps['variant'] = 'secondary';
|
||||
buttonProps['icon'] = <Image style={styles.star} source={importDefault(8146) /* metro dependency 8146 */} />;
|
||||
string = intl.string;
|
||||
const Kd4uxG = (require(1244) /* metro dependency 1244: indexNative */).t.Kd4uxG;
|
||||
buttonProps['text'] = Reflect.apply(string, intl, [Kd4uxG]);
|
||||
buttonProps['onPress'] = value4;
|
||||
const button2 = <Button {...buttonProps} />;
|
||||
const View2 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
items3[2] = <View style={styles.buttonContainer}>{button}<View>{button2}<View2 style={[styles.border,
|
||||
isPlayingSound && styles.borderPlaying, style]} /></View></View>;
|
||||
return (
|
||||
<ActionSheet startExpanded>
|
||||
<View>
|
||||
{items3}
|
||||
</View>
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun118032() { // fn#118032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:1056, offset: 0x024c991e, size: 34 bytes, params: 1, frame: 10
|
||||
const value = environment.__proto__;
|
||||
return UserStore.getCurrentUser()?.id;
|
||||
}
|
||||
|
||||
function _fun118033() { // fn#118033, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:1191, offset: 0x024c9940, size: 82 bytes, params: 1, frame: 14
|
||||
return {isPlayingSound: env0_2 != null && SoundboardStore.isUserPlayingSounds(env0_2),
|
||||
isFavorite: SoundboardStore.isFavoriteSound(sound.soundId)};
|
||||
}
|
||||
|
||||
function _fun118034() { // fn#118034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:1341, offset: 0x024c9992, size: 163 bytes, params: 1, frame: 20
|
||||
var moduleValue;
|
||||
var trackSoundFavorited;
|
||||
var object3;
|
||||
var soundBinding;
|
||||
var object4;
|
||||
var moduleValue2;
|
||||
var value;
|
||||
if (isFavorite) {
|
||||
moduleValue2 = require(6944) /* metro dependency 6944: SoundboardActionCreators */;
|
||||
moduleValue2.removeFavoriteSound(sound.soundId);
|
||||
} else {
|
||||
moduleValue = require(6951) /* metro dependency 6951: SoundboardUtils */;
|
||||
trackSoundFavorited = moduleValue.trackSoundFavorited;
|
||||
object3 = {};
|
||||
soundBinding = sound;
|
||||
object3.sound = soundBinding;
|
||||
object4 = {};
|
||||
copyDataProperties(object4, analyticsLocations, undefined);
|
||||
object4['object'] = AnalyticsObjects.SOUNDBOARD_SOUND;
|
||||
object3.location = object4;
|
||||
Reflect.apply(trackSoundFavorited, moduleValue, [object3]);
|
||||
value = require(6944) /* metro dependency 6944: SoundboardActionCreators */;
|
||||
value.addFavoriteSound(soundBinding.soundId);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun118035() { // fn#118035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15625:1537, offset: 0x024c9a35, size: 84 bytes, params: 1, frame: 18
|
||||
var value2;
|
||||
var moduleValue;
|
||||
if (!isPlayingSound) {
|
||||
value2 = environment.__proto__;
|
||||
moduleValue = require(6944) /* metro dependency 6944: SoundboardActionCreators */;
|
||||
moduleValue.playSoundLocally(channelId, sound,
|
||||
(require(6639) /* metro dependency 6639: SoundboardTypes */).LocalSoundTrigger.SOUNDBOARD);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user