464 lines
27 KiB
TypeScript
464 lines
27 KiB
TypeScript
/* Metro module 11091; source: components_native/chat/ImageCarousel.tsx; dependencies: [31, 27, 4645, 4644, 11092, 33, 4501, 697, 4017, 4504, 1305, 4577, 44, 4650, 566, 11093, 11143, 11158, 8670, 4573, 1244, 9376, 8999, 5278, 8523, 1478, 7879, 11095, 2] */
|
|
import Module00044 from '../../by-id/module-00044.js'; /* Metro dependency 44 */
|
|
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import ReanimatedRexport from '../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import UploadAttachmentStore from '../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
|
|
import Module08523 from '../../by-id/module-08523.js'; /* Metro dependency 8523 */
|
|
import ShowUploadPreviewActionSheet from '../../modules/media_uploads/native/showUploadPreviewActionSheet.tsx'; /* Metro dependency 11093 */
|
|
import AttachmentPreview from '../../modules/media/native/AttachmentPreview.tsx'; /* Metro dependency 11143 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as UseWindowDimensionsNativeModule from '../../modules/screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import * as ReanimatedRexportModule from '../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as DraftStoreModule from '../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
|
|
import * as UploadModule from '../../lib/uploader/Upload.tsx'; /* Metro dependency 4650 */
|
|
import * as PressablesModule from '../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
|
|
import * as ImageCarouselConstantsModule from '../../modules/image/native/ImageCarouselConstants.tsx'; /* Metro dependency 11092 */
|
|
import * as MediaKeyboardUtilsModule from '../../modules/media_keyboard/native/MediaKeyboardUtils.tsx'; /* Metro dependency 11095 */
|
|
|
|
function _fun84913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:6, offset: 0x01f5c00e, size: 1003 bytes, params: 8, frame: 29
|
|
const env0_0 = require;
|
|
const useTileEntranceAnimatedStyle2 = useTileEntranceAnimatedStyle;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const StyleSheet = ReactNativeModule.StyleSheet;
|
|
const IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN = ImageCarouselConstantsModule.IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN;
|
|
const IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING = ImageCarouselConstantsModule.IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
object = {};
|
|
object.container = {width: '100%'};
|
|
object.pressableContainer = {marginHorizontal: 4};
|
|
const object4 = {'position': 'relative', 'minWidth': 60, 'backgroundColor': null, 'overflow': 'hidden'};
|
|
let BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
|
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md - 1;
|
|
object.tileContainer = object4;
|
|
const object5 = {};
|
|
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
|
object5['flex'] = 1;
|
|
object5['flexDirection'] = 'row';
|
|
object5['justifyContent'] = 'space-between';
|
|
object5['alignItems'] = 'flex-end';
|
|
object5['padding'] = 4;
|
|
object.decorationsContainer = object5;
|
|
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
|
object.highlightedTileContainer = {'borderColor': null, 'borderStyle': 'solid', 'borderWidth': 2,
|
|
'borderRadius': 10, borderColor: INTERACTIVE_TEXT_ACTIVE};
|
|
object.closeButton = {'position': 'absolute', 'top': null, 'right': 2,
|
|
top: -1 * IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN};
|
|
object.scrollview = {paddingTop: IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING};
|
|
let BACKGROUND_SCRIM_LIGHTBOX = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM_LIGHTBOX;
|
|
object.closeContainer = {'height': 20, 'width': 20, 'borderRadius': 20, 'alignItems': 'center',
|
|
'justifyContent': 'center', backgroundColor: BACKGROUND_SCRIM_LIGHTBOX};
|
|
const object10 = {};
|
|
object10.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
const BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
object10.backgroundColor = BACKGROUND_BASE_LOWER;
|
|
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
|
object10.tintColor = INTERACTIVE_TEXT_DEFAULT;
|
|
object.closeButtonIcon = object10;
|
|
const object11 = {};
|
|
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object11.paddingHorizontal = PX_4;
|
|
object11.lineHeight = 20;
|
|
BACKGROUND_SCRIM_LIGHTBOX = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM_LIGHTBOX;
|
|
object11.backgroundColor = BACKGROUND_SCRIM_LIGHTBOX;
|
|
object11.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object11.textTransform = 'uppercase';
|
|
object.altTagText = object11;
|
|
const object12 = {};
|
|
BACKGROUND_SCRIM_LIGHTBOX = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SCRIM_LIGHTBOX;
|
|
object12.backgroundColor = BACKGROUND_SCRIM_LIGHTBOX;
|
|
object12.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
|
|
object12.padding = PX_4;
|
|
object.iconContainer = object12;
|
|
const object13 = {};
|
|
copyDataProperties(object13, StyleSheet.absoluteFillObject, undefined);
|
|
object.spoilerOverlay = object13;
|
|
BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
|
object.footerRightContainer = {'position': 'absolute', 'bottom': 4, 'right': 4, 'alignItems': 'center',
|
|
'justifyContent': 'center', 'alignContent': 'center', 'backgroundColor': null, 'padding': 4, 'borderRadius': 20,
|
|
'opacity': 0.85, backgroundColor: BACKGROUND_SURFACE_HIGH};
|
|
const env0_13 = Reflect.apply(createStyles, CreateStylesModule, [object]);
|
|
object = {code: "function ImageCarouselTsx1(){const{withTiming,animatedStylePropValue,STANDARD_EASING,withSpring}=this.__closure;return{opacity:withTiming(animatedStylePropValue.get(),{duration:300,easing:STANDARD_EASING},'animate-always'),transform:[{scale:withSpring(animatedStylePropValue.get(),{stiffness:80,damping:6,mass:0.3},'animate-always')}]};}"};
|
|
value = value.memo(_fun84928);
|
|
(FileImportTrackerModule).fileFinishedImporting('components_native/chat/ImageCarousel.tsx');
|
|
exports.default = value;
|
|
exports.useTileEntranceAnimatedStyle = useTileEntranceAnimatedStyle2;
|
|
function useTileEntranceAnimatedStyle(a0) { // fn#84914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2146, offset: 0x01f5c3f9, size: 216 bytes, params: 2, frame: 20
|
|
const value2 = (ReanimatedRexportModule).useSharedValue(0);
|
|
env0_3.useEffect(_fun84915, [value2, a0]);
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const useTileEntranceAnimatedStyleL2 = useTileEntranceAnimatedStyleL;
|
|
object = {};
|
|
object.withTiming = (require(4504) /* metro dependency 4504: timing */).withTiming;
|
|
object.animatedStylePropValue = value2;
|
|
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
|
|
object.STANDARD_EASING = STANDARD_EASING;
|
|
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
|
useTileEntranceAnimatedStyleL2.__closure = object;
|
|
useTileEntranceAnimatedStyleL2.__workletHash = 9754366991991;
|
|
useTileEntranceAnimatedStyleL2.__initData = env0_14;
|
|
return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [useTileEntranceAnimatedStyleL2]);
|
|
function _fun84915() { // fn#84915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2241, offset: 0x01c2f741, size: 24 bytes, params: 1, frame: 11
|
|
env0_0.set(1);
|
|
}
|
|
|
|
function useTileEntranceAnimatedStyleL() { // fn#84916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2293, owner: useTileEntranceAnimatedStyle.l, offset: 0x01f5c4d1, size: 168 bytes, params: 1, frame: 20
|
|
const object = {};
|
|
let value = environment.__proto__;
|
|
value = require(4504) /* metro dependency 4504: timing */;
|
|
const withTiming = value.withTiming;
|
|
const binding = env0_0;
|
|
const value3 = binding.get();
|
|
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
|
|
object.opacity = Reflect.apply(withTiming, value, [value3, {duration: 300, easing: STANDARD_EASING},
|
|
'animate-always']);
|
|
const object3 = {};
|
|
value = require(4577) /* metro dependency 4577: spring */;
|
|
object3.scale = value.withSpring(binding.get(), {'stiffness': 80, 'damping': 6, 'mass': 0.3}, 'animate-always');
|
|
object.transform = [object3];
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function Tile({onEdit, onRemove, channelId, highlightThumbnails, upload}) { // fn#84917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:2701, offset: 0x01f5c579, size: 1259 bytes, params: 2, frame: 40
|
|
var object4;
|
|
highlightThumbnails = !(highlightThumbnails === undefined) && highlightThumbnails;
|
|
const upload2 = upload;
|
|
const styles = useStyles();
|
|
const description = upload.description;
|
|
const id = upload.id;
|
|
const item = upload.item;
|
|
const isVideo = upload.isVideo;
|
|
const isImage = upload.isImage;
|
|
const isThumbnail = upload.isThumbnail;
|
|
const defaultImport = Module00044;
|
|
const platform = item.platform;
|
|
const UploadPlatform = (UploadModule).UploadPlatform;
|
|
const REACT_NATIVE = UploadPlatform.REACT_NATIVE;
|
|
defaultImport(platform === REACT_NATIVE, 'Upload must be a React Native upload item.');
|
|
let r15 = highlightThumbnails && isThumbnail === true;
|
|
const value3 = (FluxModule).useStateFromStores([UploadAttachmentStore],
|
|
_fun84918);
|
|
let binding = upload2;
|
|
let useCallback = binding.useCallback;
|
|
const value4 = Reflect.apply(useCallback, binding, [_fun84919, [isVideo, isImage, r15]]);
|
|
const value5 = upload2.useCallback(_fun84920, [onRemove, id]);
|
|
const value6 = upload2.useCallback(_fun84921, [channelId, onRemove, onEdit, upload, id]);
|
|
const value7 = upload2.useCallback(_fun84923, [value5]);
|
|
const value8 = useTileEntranceAnimatedStyle(item.id ?? item.uri);
|
|
binding = upload2;
|
|
useCallback = binding.useCallback;
|
|
let filename = item.filename;
|
|
const value9 = Reflect.apply(useCallback, binding, [_fun84924, [value4, value8, description, item.uri, filename,
|
|
isImage, isThumbnail, isVideo, value3, styles]]);
|
|
object4 = {name: 'remove'};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
object4.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.kFwAsa]);
|
|
const items2 = [object4];
|
|
const PressableOpacity = (PressablesModule).PressableOpacity;
|
|
let formatToPlainString = intl.formatToPlainString;
|
|
const MJHFt9 = (require(1244) /* metro dependency 1244: indexNative */).t.MJHFt9;
|
|
filename = item.filename;
|
|
const value10 = '';
|
|
string = intl.string;
|
|
const QtJ1c5 = (require(1244) /* metro dependency 1244: indexNative */).t.QtJ1c5;
|
|
r15 = r15 && styles.highlightedTileContainer;
|
|
const pressableOpacity = (
|
|
<PressableOpacity
|
|
accessibilityRole="button"
|
|
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [MJHFt9, {name: filename ?? value10}])}
|
|
accessibilityHint={Reflect.apply(string, intl, [QtJ1c5])}
|
|
accessibilityActions={items2}
|
|
onAccessibilityAction={value7}
|
|
disabled={!isImage && !isVideo}
|
|
onPress={value6}
|
|
style={[styles.pressableContainer, r15]}
|
|
>
|
|
{value9()}
|
|
</PressableOpacity>
|
|
);
|
|
formatToPlainString = intl.formatToPlainString;
|
|
const FxKgb3 = (require(1244) /* metro dependency 1244: indexNative */).t.FxKgb3;
|
|
const object = {};
|
|
object.name = item.filename ?? value10;
|
|
const View2 = (ReanimatedRexport).View;
|
|
const items4 = [styles.closeContainer, value8];
|
|
const Icon = (NativeModule).Icon;
|
|
const object2 = {source: Module08523};
|
|
const Icon2 = (NativeModule).Icon;
|
|
const Sizes = Icon2.Sizes;
|
|
const MEDIUM = Sizes.MEDIUM;
|
|
object2.size = MEDIUM;
|
|
const PRIMARY_500 = (Native).unsafe_rawColors.PRIMARY_500;
|
|
object2.color = PRIMARY_500;
|
|
object2.style = styles.closeButtonIcon;
|
|
return (
|
|
<View>
|
|
{pressableOpacity}
|
|
<PressableOpacity
|
|
accessibilityRole="button"
|
|
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [FxKgb3, object])}
|
|
style={styles.closeButton}
|
|
onPress={value5}
|
|
hitSlop={{
|
|
'top': 4,
|
|
'bottom': 4,
|
|
'left': 4,
|
|
'right': 4,
|
|
}}
|
|
>
|
|
<View2 style={items4}>
|
|
<Icon {...object2} />
|
|
</View2>
|
|
</PressableOpacity>
|
|
</View>
|
|
);
|
|
function _fun84918() { // fn#84918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3028, offset: 0x01f5ca64, size: 70 bytes, params: 1, frame: 15
|
|
const value = environment.__proto__;
|
|
const uploadAttachmentStoreBinding = UploadAttachmentStore;
|
|
const getUpload = uploadAttachmentStoreBinding.getUpload;
|
|
const channelIdBinding = channelId;
|
|
const idBinding = id;
|
|
const ChannelMessage = DraftType.ChannelMessage;
|
|
const spoiler = Reflect.apply(getUpload, uploadAttachmentStoreBinding, [channelIdBinding, idBinding,
|
|
ChannelMessage])?.spoiler;
|
|
return spoiler != null && spoiler;
|
|
}
|
|
|
|
function _fun84919() { // fn#84919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3140, offset: 0x01f5caaa, size: 65 bytes, params: 1, frame: 5
|
|
var r1;
|
|
var IMAGE_CAROUSEL_TILE_HEIGHT2;
|
|
let value = environment.__proto__;
|
|
const r2 = JsxRuntimeModule.jsx ? IMAGE_CAROUSEL_TILE_HEIGHT - 4 : IMAGE_CAROUSEL_TILE_HEIGHT;
|
|
const r4 = isVideo || isImage;
|
|
value = undefined;
|
|
if (r4) {
|
|
r1 = value;
|
|
IMAGE_CAROUSEL_TILE_HEIGHT2 = IMAGE_CAROUSEL_TILE_HEIGHT;
|
|
} else {
|
|
r1 = 192;
|
|
IMAGE_CAROUSEL_TILE_HEIGHT2 = value;
|
|
}
|
|
return {width: IMAGE_CAROUSEL_TILE_HEIGHT2, height: r2, maxWidth: r1};
|
|
}
|
|
|
|
function _fun84920() { // fn#84920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3264, offset: 0x01f5caeb, size: 35 bytes, params: 1, frame: 12
|
|
return onRemove?.(id);
|
|
}
|
|
|
|
function _fun84921() { // fn#84921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3313, offset: 0x01f5cb0e, size: 77 bytes, params: 1, frame: 13
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
(ShowUploadPreviewActionSheet)({channelId: channelId,
|
|
onRemove: onRemove, onEdit: onEdit, upload: upload});
|
|
function onEdit(a0) { // fn#84922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3358, offset: 0x01f5cb5b, size: 39 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__;
|
|
return onEdit?.(id, a0);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun84923({nativeEvent}) { // fn#84923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3426, offset: 0x01f5cb82, size: 40 bytes, params: 2, frame: 9
|
|
if (nativeEvent.actionName === 'remove') {
|
|
env0_14();
|
|
}
|
|
}
|
|
|
|
function _fun84924() { // fn#84924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:3552, offset: 0x01f5cbaa, size: 865 bytes, params: 1, frame: 33
|
|
var r16;
|
|
var Text;
|
|
var intl;
|
|
const value2 = undefined;
|
|
const {width, height, maxWidth} = env0_13();
|
|
const View2 = (ReanimatedRexport).View;
|
|
const items2 = [styles.tileContainer];
|
|
items2[1] = {width: width, height: height};
|
|
items2[2] = env0_15;
|
|
const value5 = ((Component) => <Component uri={item.uri} isImage={isImage} isVideo={isVideo} width={width} height={height} maxFileWidth={maxWidth} fileName={item.filename} borderRadius={(Native).radii.md} />)(AttachmentPreview);
|
|
const isThumbnailBinding = isThumbnail;
|
|
const value6 = null;
|
|
const r5 = (
|
|
isThumbnailBinding
|
|
? (
|
|
<View style={styles.footerRightContainer}>
|
|
{((Icon) => <Icon source={importDefault(11158) /* metro dependency 11158 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_14} />)((require(1305) /* metro dependency 1305: native */).Icon)}
|
|
</View>
|
|
)
|
|
: value6
|
|
);
|
|
const items3 = [
|
|
JsxRuntimeModule.jsxs
|
|
? ((Component) => <Component style={styles.spoilerOverlay} />)(importDefault(8670) /* metro dependency 8670: VisualEffectViewThemed */)
|
|
: value6,
|
|
];
|
|
if (value6 != description) {
|
|
if ((value6 == description ? value2 : description.length) > 0) {
|
|
Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
var textProps = {'variant': 'text-xs/medium', 'color': 'white', 'allowFontScaling': false,
|
|
style: styles.altTagText};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
r16 = (
|
|
<Text {...textProps}>
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.QEW81z)}
|
|
</Text>
|
|
);
|
|
} else {
|
|
r16 = value6;
|
|
}
|
|
} else {
|
|
r16 = value6;
|
|
}
|
|
const items4 = [r16];
|
|
items4[1] = (
|
|
isVideo
|
|
? (
|
|
<View style={styles.iconContainer}>
|
|
{((PlayIcon) => <PlayIcon size="xxs" color="white" />)((require(9376) /* metro dependency 9376: PlayIcon */).PlayIcon)}
|
|
</View>
|
|
)
|
|
: value6
|
|
);
|
|
items3[1] = (
|
|
<View>
|
|
{items4}
|
|
</View>
|
|
);
|
|
items3[2] = (
|
|
JsxRuntimeModule.jsxs
|
|
? (
|
|
<View style={styles.iconContainer}>
|
|
{((EyeIcon) => <EyeIcon size="xxs" color="white" />)((require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon)}
|
|
</View>
|
|
)
|
|
: value6
|
|
);
|
|
return (
|
|
<View2 style={items2}>
|
|
{value5}
|
|
{r5}
|
|
<View style={styles.decorationsContainer}>
|
|
{items3}
|
|
</View>
|
|
</View2>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function CustomScrollView(a0) { // fn#84925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5336, offset: 0x01f5cf0b, size: 207 bytes, params: 2, frame: 18
|
|
const styles = useStyles();
|
|
const env0_0 = env0_3.useRef(0);
|
|
const env0_1 = env0_3.useRef(0);
|
|
return (
|
|
<ScrollView
|
|
{...a0}
|
|
{...{['ref']: env0_3.useRef(null)}}
|
|
{...{['onContentSizeChange']: env0_3.useCallback(_fun84926, [])}}
|
|
{...{['onScroll']: env0_3.useCallback(_fun84927, [])}}
|
|
{...{['scrollEventThrottle']: 16}}
|
|
{...{['contentContainerStyle']: styles.scrollview}}
|
|
/>
|
|
);
|
|
function _fun84926(a0) { // fn#84926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5437, offset: 0x01f5cfda, size: 122 bytes, params: 2, frame: 15
|
|
let current = env0_0.current;
|
|
const current2 = env0_1.current;
|
|
const getWindowDimensions = UseWindowDimensionsNativeModule.getWindowDimensions;
|
|
if (a0 > current || current2 + Reflect.apply(getWindowDimensions, UseWindowDimensionsNativeModule, []).width > a0) {
|
|
current = env0_2.current;
|
|
if (current != null) {
|
|
current.scrollToEnd();
|
|
}
|
|
}
|
|
env0_0.current = a0;
|
|
}
|
|
|
|
function _fun84927({nativeEvent}) { // fn#84927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5594, offset: 0x01f5d054, size: 37 bytes, params: 2, frame: 2
|
|
env0_1.current = nativeEvent.contentOffset.x;
|
|
}
|
|
|
|
}
|
|
|
|
function _fun84928({attachments, channelId, headerElement, highlightThumbnails}) { // fn#84928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5774, offset: 0x01f5d079, size: 428 bytes, params: 2, frame: 25
|
|
var r8;
|
|
if (highlightThumbnails !== undefined) {
|
|
}
|
|
let env0_3 = undefined;
|
|
var value;
|
|
const styles = useStyles();
|
|
let r11 = attachments != null && attachments.length > 0;
|
|
r11 = !r11 ? headerElement != null : r11;
|
|
env0_3 = env0_3.useCallback(_fun84930, [channelId, env0_3.useCallback(function(a0) {
|
|
importDefault(dependencyMap[26]).remove(channelId, a0, DraftType.ChannelMessage);
|
|
}, [channelId])]);
|
|
const items2 = [styles.container];
|
|
items2[1] = {height: r11 ? IMAGE_CAROUSEL_TILE_HEIGHT + IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING : 0,
|
|
marginTop: r11 ? -1 * (IMAGE_CAROUSEL_TILE_CLOSE_BUTTON_PADDING - IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN) : 0,
|
|
marginBottom: r11 ? 2 * IMAGE_CAROUSEL_EXPERIMENT_TILE_MARGIN : 0};
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const RhtzFe = (IndexNativeModule).t.RhtzFe;
|
|
if (attachments != null) {
|
|
value = global.Object.values(attachments);
|
|
value = value.map(_fun84931);
|
|
r8 = value;
|
|
} else {
|
|
r8 = null;
|
|
}
|
|
return (
|
|
<View style={items2}>
|
|
<CustomScrollView
|
|
horizontal
|
|
keyboardShouldPersistTaps="always"
|
|
showsHorizontalScrollIndicator={false}
|
|
accessibilityRole="list"
|
|
accessibilityLabel={Reflect.apply(string, intl, [RhtzFe])}
|
|
>
|
|
{headerElement}
|
|
{r8}
|
|
</CustomScrollView>
|
|
</View>
|
|
);
|
|
function _fun84930(a0, a1) { // fn#84930, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:5977, offset: 0x01f5d261, size: 106 bytes, params: 3, frame: 18
|
|
if (env0_2 != null) {
|
|
env0_2(a0);
|
|
}
|
|
const addImagesFromPicker = MediaKeyboardUtilsModule.addImagesFromPicker;
|
|
const channelIdBinding = channelId;
|
|
const UploadOrigin = (UploadModule).UploadOrigin;
|
|
const IMAGE_EDITOR = UploadOrigin.IMAGE_EDITOR;
|
|
Reflect.apply(addImagesFromPicker, MediaKeyboardUtilsModule, [channelIdBinding, [a1], IMAGE_EDITOR]);
|
|
}
|
|
|
|
function _fun84931(a0) { // fn#84931, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11277:6410, offset: 0x01f5d2cb, size: 76 bytes, params: 2, frame: 16
|
|
return (
|
|
<Tile
|
|
channelId={channelId}
|
|
highlightThumbnails={highlightThumbnails}
|
|
onEdit={env0_3}
|
|
onRemove={env0_2}
|
|
upload={a0}
|
|
key={a0.uniqueId}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun84913, 11091, [31, 27, 4645, 4644, 11092, 33, 4501, 697, 4017, 4504, 1305, 4577, 44, 4650, 566,
|
|
11093, 11143, 11158, 8670, 4573, 1244, 9376, 8999, 5278, 8523, 1478, 7879, 11095,
|
|
2]) /* metro module 11091, dependencies: [31, 27, 4645, 4644, 11092, 33, 4501, 697, 4017, 4504, 1305, 4577, 44, 4650, 566, 11093, 11143, 11158, 8670, 4573, 1244, 9376, 8999, 5278, 8523, 1478, 7879, 11095, 2] */;
|