646 lines
39 KiB
TypeScript
646 lines
39 KiB
TypeScript
/* Metro module 14813; source: modules/icymi/native/ICYMI.tsx; dependencies: [57, 31, 27, 4502, 1226, 1867, 9577, 9569, 14814, 1376, 33, 4501, 697, 14815, 8341, 13512, 9580, 4080, 14817, 1962, 4068, 14828, 4573, 1244, 7556, 6618, 7704, 3963, 5278, 14762, 14764, 5312, 9579, 1478, 1585, 1485, 4884, 566, 14744, 14848, 14851, 7014, 1365, 14838, 1484, 7230, 5080, 11179, 13574, 677, 14852, 14858, 14863, 14876, 14877, 14878, 14879, 14880, 14881, 14882, 14883, 7701, 14884, 8416, 477, 9871, 4003, 14885, 14816, 3868, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import AuthenticationStore from '../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
|
|
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UseColorThemeBackground from '../../client_themes/native/useColorThemeBackground.tsx'; /* Metro dependency 4003 */
|
|
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
|
|
import UseIsWindowLarge from '../../screen/native/useIsWindowLarge.tsx'; /* Metro dependency 7556 */
|
|
import ThemedGradient from '../../client_themes/native/ThemedGradient.tsx'; /* Metro dependency 7704 */
|
|
import ICYMIStore from '../ICYMIStore.tsx'; /* Metro dependency 9569 */
|
|
import ICYMIFiltersStore from '../ICYMIFiltersStore.tsx'; /* Metro dependency 9577 */
|
|
import ICYMIActionCreators from '../ICYMIActionCreators.tsx'; /* Metro dependency 9580 */
|
|
import UseICYMITabBadge from '../useICYMITabBadge.tsx'; /* Metro dependency 14744 */
|
|
import NewContentPill from './NewContentPill.tsx'; /* Metro dependency 14884 */
|
|
import AppFreezer from '../../panels/morphable/native/AppFreezer.tsx'; /* Metro dependency 14885 */
|
|
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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
|
|
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
import * as Module01485Module from '../../../by-id/module-01485.js'; /* Metro dependency 1485 */
|
|
import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
|
|
import * as ClientThemesUtilsModule from '../../client_themes/native/ClientThemesUtils.tsx'; /* Metro dependency 3963 */
|
|
import * as CircleInformationIconModule from '../../../design/components/Icon/native/redesign/generated/CircleInformationIcon.tsx'; /* Metro dependency 4068 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as TTIAnalyticsUtilsModule from '../../tti_analytics/native/TTIAnalyticsUtils.tsx'; /* Metro dependency 4884 */
|
|
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
|
|
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
|
|
import * as UseGetDismissibleContentModule from '../../dismissible_content/useGetDismissibleContent.tsx'; /* Metro dependency 7014 */
|
|
import * as ICYMITypesModule from '../ICYMITypes.tsx'; /* Metro dependency 7230 */
|
|
import * as ClientThemesOverridesModule from '../../client_themes/native/ClientThemesOverrides.tsx'; /* Metro dependency 7701 */
|
|
import * as IconButtonNativeModule from '../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
|
|
import * as FlashListModule from '../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */
|
|
import * as ICYMIUtilsModule from '../ICYMIUtils.tsx'; /* Metro dependency 9579 */
|
|
import * as TTIFirstContentfulPaintModule from '../../tti_analytics/native/TTIFirstContentfulPaint.tsx'; /* Metro dependency 9871 */
|
|
import * as FiltersHorizontalIconModule from '../../../design/components/Icon/native/redesign/generated/FiltersHorizontalIcon.tsx'; /* Metro dependency 13512 */
|
|
import * as UseTabsVisibleModule from '../../main_tabs_v2/native/utils/useTabsVisible.tsx'; /* Metro dependency 13574 */
|
|
import * as ICYMIConstantsModule from '../ICYMIConstants.tsx'; /* Metro dependency 14814 */
|
|
import * as CreateICYMIStylesModule from './createICYMIStyles.tsx'; /* Metro dependency 14815 */
|
|
import * as ICYMIContextModule from './ICYMIContext.tsx'; /* Metro dependency 14816 */
|
|
import * as NativeICYMIUtilsModule from './NativeICYMIUtils.tsx'; /* Metro dependency 14828 */
|
|
import * as UseSharedICYMILogicModule from '../useSharedICYMILogic.tsx'; /* Metro dependency 14848 */
|
|
import * as UseICYMIEmptyLoadingAnalyticsModule from '../useICYMIEmptyLoadingAnalytics.tsx'; /* Metro dependency 14851 */
|
|
|
|
function _fun111780(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#111780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:6, offset: 0x023b1c82, size: 486 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const keyExtractor_111811 = function(a0) {
|
|
return a0.id;
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_17 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
|
|
var object2 = {};
|
|
object2.backgroundColor = importDefault(dependencyMap[12]).colors.BACKGROUND_BASE_LOWEST;
|
|
object2.paddingHorizontal = importDefault(dependencyMap[12]).space.PX_8;
|
|
object2.overflow = 'hidden';
|
|
object2.flex = 1;
|
|
object2.paddingTop = a0;
|
|
return {containerOuterTablet: object2};
|
|
});
|
|
const env0_18 = (CreateICYMIStylesModule).createICYMIStyles(_fun111813);
|
|
const env0_19 = ReactModule.memo(_fun111814);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/icymi/native/ICYMI.tsx');
|
|
exports.ICYMITab = ICYMITab;
|
|
function SettingsButton() { // fn#111781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:1824, offset: 0x023b1e68, size: 112 bytes, params: 1, frame: 18
|
|
const IconButton = (IconButtonNativeModule).IconButton;
|
|
const FiltersHorizontalIcon = (FiltersHorizontalIconModule).FiltersHorizontalIcon;
|
|
return (
|
|
<IconButton
|
|
accessibilityLabel="button"
|
|
variant="tertiary"
|
|
size="sm"
|
|
icon={<FiltersHorizontalIcon size="sm" />}
|
|
onPress={onPress_111782}
|
|
/>
|
|
);
|
|
function SettingsButtonOnPress() { // fn#111782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:1996, owner: SettingsButton.onPress, offset: 0x023b1ed8, size: 160 bytes, params: 1, frame: 19
|
|
let value = environment.__proto__;
|
|
importDefault(dependencyMap[16]).itemInteracted('filters_button', 'filters_button', 'press_info_button');
|
|
importDefault(dependencyMap[16]).feedPageActioned({actionParameters: {'actionGestureType': 'press',
|
|
'actionTargetElement': 'settings_button', 'actionIntentType': 'open', 'actionDestinationType': null}});
|
|
const defaultImport3 = importDefault(dependencyMap[17]);
|
|
const openLazy = defaultImport3.openLazy;
|
|
value = require(dependencyMap[19]);
|
|
value = value(dependencyMap[18], dependencyMap.paths);
|
|
Reflect.apply(openLazy, defaultImport3, [value, 'ICYMISettingsActionSheet', {}]);
|
|
}
|
|
|
|
}
|
|
|
|
function InfoButton() { // fn#111783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:2319, offset: 0x023b1f78, size: 112 bytes, params: 1, frame: 18
|
|
const IconButton = (IconButtonNativeModule).IconButton;
|
|
const CircleInformationIcon = (CircleInformationIconModule).CircleInformationIcon;
|
|
return (
|
|
<IconButton
|
|
accessibilityLabel="button"
|
|
variant="tertiary"
|
|
size="sm"
|
|
icon={<CircleInformationIcon size="sm" />}
|
|
onPress={onPress_111784}
|
|
/>
|
|
);
|
|
function InfoButtonOnPress() { // fn#111784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:2487, owner: InfoButton.onPress, offset: 0x023b1fe8, size: 129 bytes, params: 1, frame: 19
|
|
const value = environment.__proto__;
|
|
(ICYMIActionCreators).itemInteracted('info_button', 'info_button',
|
|
'press_info_button');
|
|
(ICYMIActionCreators).feedPageActioned({actionParameters: {'actionGestureType': 'press',
|
|
'actionTargetElement': 'info_button', 'actionIntentType': 'open', 'actionDestinationType': null}});
|
|
(NativeICYMIUtilsModule).pushICYMIInfoModal({extendedOnboarding: true});
|
|
}
|
|
|
|
}
|
|
|
|
function ICYMIHeaderTextWrapper() { // fn#111785, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:2780, offset: 0x023b2069, size: 73 bytes, params: 1, frame: 16
|
|
return (
|
|
<View style={env0_18().headerText}>
|
|
{env0_4.useMemo(_fun111786, [])}
|
|
</View>
|
|
);
|
|
function _fun111786() { // fn#111786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:2837, offset: 0x023b20b2, size: 240 bytes, params: 1, frame: 24
|
|
const jsxRuntimeEnv1_15Binding = jsxRuntimeEnv1_15;
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const SY4sdZ = (IndexNativeModule).t.SY4sdZ;
|
|
const text = (
|
|
<Text
|
|
color="mobile-text-heading-primary"
|
|
variant="heading-lg/bold"
|
|
maxFontSizeMultiplier={1.75}
|
|
accessibilityRole="header"
|
|
>
|
|
{Reflect.apply(string, intl, [SY4sdZ])}
|
|
</Text>
|
|
);
|
|
string = intl.string;
|
|
const Ac2OZA = (IndexNativeModule).t.Ac2OZA;
|
|
return (
|
|
<>
|
|
{text}
|
|
<Text
|
|
color="text-brand"
|
|
variant="text-xs/bold"
|
|
style={{marginTop: 4}}
|
|
>
|
|
{Reflect.apply(string, intl, [Ac2OZA])}
|
|
</Text>
|
|
</>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
function handleEndReached() { // fn#111787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:3995, offset: 0x023b21a2, size: 37 bytes, params: 1, frame: 11
|
|
(ICYMIUtilsModule).hydrateNextPage();
|
|
}
|
|
|
|
function ICYMI({inNestedNavigator}) { // fn#111788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:4050, offset: 0x023b21c7, size: 1612 bytes, params: 2, frame: 45
|
|
const value2 = env0_18();
|
|
const {height, width} = (UseWindowDimensionsNative)();
|
|
const top = (UseSafeAreaInsetsNative)().top;
|
|
const value4 = (Module01485Module).useIsFocused();
|
|
visibleItemIds2.useLayoutEffect(_fun111789);
|
|
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
|
function() {
|
|
return AccessibilityStore.useReducedMotion;
|
|
});
|
|
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
|
|
return ICYMIStore.notificationItem();
|
|
}, []);
|
|
const showDot = (UseICYMITabBadge)().showDot;
|
|
visibleItemIds2.useEffect(_fun111792, [value4]);
|
|
const value6 = (UseSharedICYMILogicModule).useSharedICYMILogic({showDot: showDot,
|
|
notificationItem: value5});
|
|
const data = value6.data;
|
|
const data2 = data;
|
|
const loading = value6.loading;
|
|
const version = value6.version;
|
|
const visibleItemIds = value6.visibleItemIds;
|
|
var visibleItemIds2 = visibleItemIds;
|
|
const endVisible = value6.endVisible;
|
|
const isRefreshing = value6.isRefreshing;
|
|
const handleOnRefresh = value6.handleOnRefresh;
|
|
const stickyHeaderIndices = value6.stickyHeaderIndices;
|
|
const viewabilityConfigCallbackPairs = value6.viewabilityConfigCallbackPairs;
|
|
(UseICYMIEmptyLoadingAnalyticsModule).useICYMIEmptyLoadingAnalytics(loading,
|
|
value4);
|
|
const useGetDismissibleContent = UseGetDismissibleContentModule.useGetDismissibleContent;
|
|
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
|
|
const ICYMI_ALPHA_UPSELL = DismissibleContent.ICYMI_ALPHA_UPSELL;
|
|
const value8 = data2(Reflect.apply(useGetDismissibleContent, UseGetDismissibleContentModule,
|
|
[[ICYMI_ALPHA_UPSELL]]), 2);
|
|
visibleItemIds2.useEffect(_fun111794, [value8[0], value8[1],
|
|
(require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], function() {
|
|
return GuildStore.getGuildCount();
|
|
})]);
|
|
visibleItemIds2.useEffect(_fun111795, [endVisible]);
|
|
const value11 = visibleItemIds2.useRef(null);
|
|
(Module01485Module).useScrollToTop(visibleItemIds2.useRef({scrollToTop: scrollToTop_111796}));
|
|
visibleItemIds2.useEffect(_fun111798,
|
|
[(require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIFiltersStore], function() {
|
|
return ICYMIFiltersStore.getDoubleTapBehavior();
|
|
}), (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(), useReducedMotion]);
|
|
const env0_13 = visibleItemIds2.useCallback(_fun111801, [value11, useReducedMotion]);
|
|
const value16 = height - top - 32 - 24 - (UseTabsVisibleModule).useMainTabsHeight();
|
|
const value17 = visibleItemIds2.useCallback(_fun111802, [visibleItemIds, endVisible]);
|
|
const value18 = visibleItemIds2.useMemo(function() {
|
|
return {backgroundColor: 'transparent'};
|
|
}, []);
|
|
const value19 = visibleItemIds2.useMemo(_fun111808, [value16, data.length, width]);
|
|
const value20 = (ClientThemesOverridesModule).useClientThemesOverride();
|
|
const value21 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ICYMIStore], function() {
|
|
return ICYMIStore.hasNewContent();
|
|
}, []);
|
|
const items2 = [value2.containerInPanels];
|
|
items2[1] = value2.containerBackground;
|
|
const env0_193 = ((Component) => <Component inNestedNavigator={inNestedNavigator} />)(env0_19);
|
|
const items3 = [value2.flashListWrapper];
|
|
items3[1] = {height: value16, width: width, marginHorizontal: 'auto'};
|
|
items3[2] = value20;
|
|
const items4 = [
|
|
((Component) => <Component onPress={onPress_111810} isRefreshing={isRefreshing} />)(NewContentPill),
|
|
|
|
];
|
|
const FlashList = (FlashListModule).FlashList;
|
|
const flashListProps = {ref: value11, scrollEnabled: !loading, extraData: {endVisible: endVisible},
|
|
contentContainerStyle: value18};
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const OIgYlQ = (IndexNativeModule).t.OIgYlQ;
|
|
flashListProps.accessibilityLabel = Reflect.apply(string, intl, [OIgYlQ]);
|
|
flashListProps.data = data;
|
|
flashListProps.refreshing = isRefreshing;
|
|
flashListProps.refreshControl = (
|
|
<RefreshControl
|
|
onRefresh={handleOnRefresh}
|
|
refreshing={isRefreshing}
|
|
tintColor={value2.refreshing.color}
|
|
style={{opacity: value21 ? 0 : 1}}
|
|
/>
|
|
);
|
|
flashListProps.onEndReachedThreshold = 3;
|
|
flashListProps.onEndReached = handleEndReached;
|
|
flashListProps.keyExtractor = keyExtractor_111811;
|
|
flashListProps.renderItem = value17;
|
|
flashListProps.estimatedItemSize = 200;
|
|
flashListProps.estimatedListSize = value19;
|
|
flashListProps.getItemType = (require(9579) /* metro dependency 9579: ICYMIUtils */).itemToType;
|
|
(PlatformUtilsModule).isAndroid();
|
|
flashListProps.drawDistance = 100;
|
|
flashListProps.stickyHeaderIndices = stickyHeaderIndices;
|
|
flashListProps.viewabilityConfigCallbackPairs = viewabilityConfigCallbackPairs;
|
|
items4[1] = <FlashList {...flashListProps} key={'Version-' + (loading ? 1 : version)} />;
|
|
const TTIFirstContentfulPaint = (TTIFirstContentfulPaintModule).TTIFirstContentfulPaint;
|
|
items4[2] = <TTIFirstContentfulPaint label="icymi" />;
|
|
return (
|
|
<View style={items2}>
|
|
{env0_193}
|
|
<View style={items3}>
|
|
{items4}
|
|
</View>
|
|
</View>
|
|
);
|
|
function _fun111789() { // fn#111789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:4194, offset: 0x023b2813, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(TTIAnalyticsUtilsModule).trackAppUIViewed();
|
|
}
|
|
|
|
function _fun111792() { // fn#111792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:4393, offset: 0x023b284b, size: 45 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
(ICYMIActionCreators).setTabFocused(env0_1);
|
|
}
|
|
|
|
function _fun111794() { // fn#111794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:4890, offset: 0x023b288b, size: 91 bytes, params: 1, frame: 16
|
|
var value2;
|
|
if (env0_7 != null) {
|
|
value2 = environment.__proto__;
|
|
(require(14828) /* metro dependency 14828: NativeICYMIUtils */).pushICYMIInfoModal({extendedOnboarding: guildCount <= NUM_GUILDS_EXTENDED_ONBOARDING});
|
|
env0_8(ContentDismissActionType.USER_DISMISS);
|
|
}
|
|
}
|
|
|
|
function _fun111795() { // fn#111795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5003, offset: 0x023b28e6, size: 116 bytes, params: 1, frame: 16
|
|
var r0;
|
|
var defaultImport;
|
|
var openLazy;
|
|
var value;
|
|
const endVisibleBinding = endVisible;
|
|
if (endVisibleBinding) {
|
|
value = environment.__proto__;
|
|
value = ICYMIStore.hasOpenedEnoughTimes();
|
|
r0 = value;
|
|
} else {
|
|
r0 = endVisibleBinding;
|
|
}
|
|
if (r0) {
|
|
value = environment.__proto__;
|
|
defaultImport = importDefault(dependencyMap[17]);
|
|
openLazy = defaultImport.openLazy;
|
|
value = require(dependencyMap[19]);
|
|
value = value(dependencyMap[43], dependencyMap.paths);
|
|
Reflect.apply(openLazy, defaultImport, [value, 'ICYMIFeedbackSheet', {}]);
|
|
}
|
|
}
|
|
|
|
function ICYMIScrollToTop() { // fn#111796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5156, owner: ICYMI.scrollToTop, offset: 0x023b295a, size: 54 bytes, params: 1, frame: 13
|
|
const current = env0_10.current;
|
|
if (current != null) {
|
|
current.scrollToOffset({offset: 0, animated: !useReducedMotion});
|
|
}
|
|
}
|
|
|
|
function _fun111798() { // fn#111798, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5369, offset: 0x023b29a5, size: 102 bytes, params: 1, frame: 14
|
|
const doubleTapBehaviorBinding = doubleTapBehavior;
|
|
const GravityICYMIDoubleTapBehavior = (ICYMITypesModule).GravityICYMIDoubleTapBehavior;
|
|
const DEFAULT = GravityICYMIDoubleTapBehavior.DEFAULT;
|
|
if (doubleTapBehaviorBinding === DEFAULT) {
|
|
env0_11.current = {scrollToTop: scrollToTop_111799};
|
|
} else {
|
|
env0_11.current = {scrollToTop: scrollToTop_111800};
|
|
}
|
|
function scrollToTop_111799() { // fn#111799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5448, offset: 0x023b2a0b, size: 54 bytes, params: 1, frame: 13
|
|
const current = env1_10.current;
|
|
if (current != null) {
|
|
current.scrollToOffset({offset: 0, animated: !useReducedMotion});
|
|
}
|
|
}
|
|
|
|
function scrollToTop_111800() { // fn#111800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5546, offset: 0x023b2a41, size: 96 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__.__proto__;
|
|
const defaultImport = importDefault(dependencyMap[46]);
|
|
const pushLazy = defaultImport.pushLazy;
|
|
value = require(dependencyMap[19]);
|
|
value = value(dependencyMap[47], dependencyMap.paths);
|
|
Reflect.apply(pushLazy, defaultImport, [value, {}, 'for-later-modal', {presentation: 'modal'}]);
|
|
}
|
|
|
|
}
|
|
|
|
function _fun111801() { // fn#111801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5672, offset: 0x023b295a, size: 54 bytes, params: 1, frame: 13
|
|
const current = env0_10.current;
|
|
if (current != null) {
|
|
current.scrollToOffset({offset: 0, animated: !useReducedMotion});
|
|
}
|
|
}
|
|
|
|
function _fun111802({item}) { // fn#111802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:5812, offset: 0x023b2aa1, size: 927 bytes, params: 2, frame: 20
|
|
var environment;
|
|
var r0;
|
|
var r4;
|
|
var value;
|
|
var ICYMIForumThreadRow;
|
|
var object;
|
|
var channelType;
|
|
let data = item.data;
|
|
const kind = data.kind;
|
|
if (kind === 'message') {
|
|
channelType = item.channelType;
|
|
value = environment.__proto__;
|
|
if (channelType === (require(677) /* metro dependency 677: ChannelTypes */).ChannelTypes.GUILD_ANNOUNCEMENT) {
|
|
value = importDefault(14852) /* metro dependency 14852: AnnouncementMessageRow */;
|
|
value = ((Component) => <Component unread={item.unread} message={item.data.message} visible={visibleItemIds.find(function(a0) {
|
|
return a0.item.id === item.id;
|
|
}) != null} />)(value);
|
|
r0 = value;
|
|
} else {
|
|
value = importDefault(14858) /* metro dependency 14858: ICYMIMessageRow */;
|
|
object = {};
|
|
data = item.data;
|
|
object.message = data.message;
|
|
data = item.data;
|
|
object.messageContext = data.messageContext;
|
|
object.visible = visibleItemIds.find(_fun111804) != null;
|
|
value = ((Component) => <Component {...object} />)(value);
|
|
r0 = value;
|
|
}
|
|
r4 = r0;
|
|
value = environment.__proto__;
|
|
const CardHeightMeasurer = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
|
|
return (
|
|
<CardHeightMeasurer itemId={item.id}>
|
|
{r4}
|
|
</CardHeightMeasurer>
|
|
);
|
|
}
|
|
if (kind === 'contentInventory') {
|
|
value = environment.__proto__;
|
|
value = importDefault(14863) /* metro dependency 14863: ContentInventoryEntryRow */;
|
|
value = ((Component) => <Component visible={visibleItemIds.find(function(a0) {
|
|
return a0.item.id === item.id;
|
|
}) != null} content={item.data.content} />)(value);
|
|
r4 = value;
|
|
value = environment.__proto__;
|
|
const CardHeightMeasurer2 = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
|
|
return (
|
|
<CardHeightMeasurer2 itemId={item.id}>
|
|
{r4}
|
|
</CardHeightMeasurer2>
|
|
);
|
|
}
|
|
if (kind === 'loading') {
|
|
value = environment.__proto__;
|
|
const ICYMILoading = (require(14876) /* metro dependency 14876: ICYMILoading */).ICYMILoading;
|
|
return <ICYMILoading />;
|
|
}
|
|
if (kind === 'bottomLoading') {
|
|
value = environment.__proto__;
|
|
const ICYMIBottomLoading = (require(14877) /* metro dependency 14877: ICYMIBottomLoading */).ICYMIBottomLoading;
|
|
return <ICYMIBottomLoading />;
|
|
}
|
|
if (kind === 'end') {
|
|
value = environment.__proto__;
|
|
value = importDefault(14878) /* metro dependency 14878: CaughtUpRow */;
|
|
return ((Component) => <Component visible={endVisible} />)(value);
|
|
}
|
|
if (kind === 'guildEvent') {
|
|
value = environment.__proto__;
|
|
value = importDefault(14879) /* metro dependency 14879: ICYMIGuildEventRow */;
|
|
value = ((Component) => <Component eventId={item.data.eventId} />)(value);
|
|
r4 = value;
|
|
value = environment.__proto__;
|
|
const CardHeightMeasurer3 = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
|
|
return (
|
|
<CardHeightMeasurer3 itemId={item.id}>
|
|
{r4}
|
|
</CardHeightMeasurer3>
|
|
);
|
|
}
|
|
if (kind === 'recommendedGuilds') {
|
|
value = environment.__proto__;
|
|
const ICYMIServerRecommendationRow = (require(14880) /* metro dependency 14880: ICYMIServerRecommendationRow */).ICYMIServerRecommendationRow;
|
|
value = <ICYMIServerRecommendationRow />;
|
|
r4 = value;
|
|
value = environment.__proto__;
|
|
const CardHeightMeasurer4 = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
|
|
return (
|
|
<CardHeightMeasurer4 itemId={item.id}>
|
|
{r4}
|
|
</CardHeightMeasurer4>
|
|
);
|
|
}
|
|
if (kind === 'icymiHeader') {
|
|
value = environment.__proto__;
|
|
value = importDefault(14881) /* metro dependency 14881: ICYMIHeader */;
|
|
return ((Component) => <Component />)(value);
|
|
}
|
|
if (kind === 'forumThread') {
|
|
value = environment.__proto__;
|
|
ICYMIForumThreadRow = (require(14882) /* metro dependency 14882: ICYMIForumThreadRow */).ICYMIForumThreadRow;
|
|
object = {};
|
|
data = item.data;
|
|
object.message = data.message;
|
|
data = item.data;
|
|
object.channel = data.threadChannel;
|
|
value = visibleItemIds.find(function(a0) {
|
|
return a0.item.id === item.id;
|
|
});
|
|
object.visible = value != null;
|
|
value = <ICYMIForumThreadRow {...object} />;
|
|
r4 = value;
|
|
value = environment.__proto__;
|
|
const CardHeightMeasurer5 = (require(14883) /* metro dependency 14883: CardHeightMeasurer */).CardHeightMeasurer;
|
|
return (
|
|
<CardHeightMeasurer5 itemId={item.id}>
|
|
{r4}
|
|
</CardHeightMeasurer5>
|
|
);
|
|
}
|
|
return null;
|
|
function _fun111804({item}) { // fn#111804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:6115, offset: 0x023b2e40, size: 31 bytes, params: 2, frame: 2
|
|
return item.id === item.id;
|
|
}
|
|
|
|
}
|
|
|
|
function _fun111808() { // fn#111808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:6904, offset: 0x023b2e6b, size: 46 bytes, params: 1, frame: 4
|
|
return data.length > 0 ? {height: JsxRuntimeModule.jsx, width: width} : undefined;
|
|
}
|
|
|
|
function ICYMIOnPress() { // fn#111810, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:7270, owner: ICYMI.onPress, offset: 0x023b2eac, size: 112 bytes, params: 1, frame: 18
|
|
const value = environment.__proto__;
|
|
(ICYMIActionCreators).itemInteracted('refresh_button',
|
|
'refresh_button', 'press_refresh_button');
|
|
(ICYMIActionCreators).feedPageActioned({actionParameters: {'actionGestureType': 'press',
|
|
'actionTargetElement': 'new_content_pill', 'actionIntentType': 'refresh', 'actionDestinationType': null}});
|
|
handleOnRefresh();
|
|
env0_13();
|
|
}
|
|
|
|
}
|
|
|
|
function _fun111813({margin}) { // fn#111813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:539, offset: 0x023b2f7e, size: 621 bytes, params: 2, frame: 16
|
|
const object = {container: {'flex': 1, 'flexShrink': 1, 'flexGrow': 1}};
|
|
const object2 = {'flex': 1, 'flexShrink': 1, 'flexGrow': 1, 'overflow': 'hidden'};
|
|
object2.borderTopLeftRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object2.borderTopRightRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object.containerInPanels = object2;
|
|
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object.containerBackground = {backgroundColor: BACKGROUND_BASE_LOW};
|
|
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object.flashListWrapper = {'backgroundColor': null, 'minHeight': 2, 'flex': 1, backgroundColor: BACKGROUND_BASE_LOW};
|
|
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
|
object.refreshing = {color: INTERACTIVE_TEXT_DEFAULT};
|
|
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object.header = {'backgroundColor': null, 'position': 'relative', 'overflow': 'hidden', 'width': '100%',
|
|
backgroundColor: BACKGROUND_BASE_LOW};
|
|
object.headerLeft = {'flexDirection': 'row', 'alignItems': 'center'};
|
|
const object7 = {};
|
|
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object7.marginRight = PX_16;
|
|
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object7.height = PX_32;
|
|
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object7.width = PX_32;
|
|
object7.alignItems = 'center';
|
|
object7.justifyContent = 'center';
|
|
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
object.headerClose = object7;
|
|
object.headerTitle = {'height': 56, 'marginHorizontal': null, 'flexDirection': 'row', 'alignItems': 'center',
|
|
'justifyContent': 'space-between', marginHorizontal: margin};
|
|
object.headerText = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4};
|
|
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object.headerActions = {'flexDirection': 'row', 'alignItems': 'center', gap: PX_12};
|
|
const object8 = {'height': 18, 'width': 18};
|
|
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
object.notificationBadge = object8;
|
|
const PX_96 = (importDefault(697) /* metro dependency 697: native */).space.PX_96;
|
|
object.loading = {'flex': 1, 'justifyContent': 'center', paddingTop: PX_96};
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object.headerBorder = {'position': 'absolute', 'bottom': 0, 'left': 0, 'right': 0, 'backgroundColor': null,
|
|
'height': 1, backgroundColor: BORDER_SUBTLE};
|
|
return object;
|
|
}
|
|
|
|
function _fun111814({inNestedNavigator}) { // fn#111814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:3236, offset: 0x023b31eb, size: 638 bytes, params: 2, frame: 33
|
|
var r14;
|
|
const PressableOpacity = (PressablesModule).PressableOpacity;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const value2 = env0_18();
|
|
const value3 = (UseIsWindowLarge)();
|
|
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
|
|
const header = value2.header;
|
|
const {LEVEL_7, LEVEL_8} = (ClientThemesUtilsModule).OverlayOpacity;
|
|
const items2 = [
|
|
<ThemedGradient
|
|
absolute
|
|
wide
|
|
tall
|
|
mix
|
|
mixAmount={{dark: LEVEL_7, light: LEVEL_8}}
|
|
/>,
|
|
];
|
|
const headerTitle = value2.headerTitle;
|
|
const headerLeft = value2.headerLeft;
|
|
if (value3) {
|
|
r14 = (
|
|
<PressableOpacity
|
|
style={value2.headerClose}
|
|
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
|
|
onPress={(require(14762) /* metro dependency 14762: Notifications */).goBack}
|
|
>
|
|
{
|
|
inNestedNavigator
|
|
? ((LeftBackIconWithBadge) => <LeftBackIconWithBadge includeNotificationsCount />)((require(14764) /* metro dependency 14764: BackIconWithBadge */).LeftBackIconWithBadge)
|
|
: ((XSmallIcon) => <XSmallIcon color="interactive-text-default" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)
|
|
}
|
|
</PressableOpacity>
|
|
);
|
|
} else if (inNestedNavigator) {
|
|
r14 = (
|
|
<PressableOpacity
|
|
style={value2.headerClose}
|
|
accessibilityLabel={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
|
|
onPress={(require(14762) /* metro dependency 14762: Notifications */).goBack}
|
|
>
|
|
{
|
|
inNestedNavigator
|
|
? ((LeftBackIconWithBadge) => <LeftBackIconWithBadge includeNotificationsCount />)((require(14764) /* metro dependency 14764: BackIconWithBadge */).LeftBackIconWithBadge)
|
|
: ((XSmallIcon) => <XSmallIcon color="interactive-text-default" />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)
|
|
}
|
|
</PressableOpacity>
|
|
);
|
|
} else {
|
|
r14 = null;
|
|
}
|
|
items2[1] = (
|
|
<View style={headerTitle}>
|
|
<View style={headerLeft}>
|
|
{r14}
|
|
<ICYMIHeaderTextWrapper />
|
|
</View>
|
|
<View style={value2.headerActions}>
|
|
<InfoButton />
|
|
<SettingsButton />
|
|
</View>
|
|
</View>
|
|
);
|
|
items2[2] = <View style={value2.headerBorder} />;
|
|
return (
|
|
<SafeAreaPaddingView top={!value3} style={header}>
|
|
{items2}
|
|
</SafeAreaPaddingView>
|
|
);
|
|
}
|
|
|
|
function ICYMITab({route}) { // fn#111815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:8277, offset: 0x023b3469, size: 496 bytes, params: 2, frame: 30
|
|
const value3 = (UseColorThemeBackground)();
|
|
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
|
|
return AuthenticationStore.getId();
|
|
});
|
|
const value4 = (UseIsWindowLarge)();
|
|
const top = (UseSafeAreaInsetsNative)().top;
|
|
const inNestedNavigator = route == null || route.params == null ? undefined : route.params.inNestedNavigator;
|
|
const styles = useStyles(top);
|
|
const value5 = env0_4.useMemo(_fun111817, [value4, styles.containerOuterTablet]);
|
|
const r9 = value4 ? View : env0_4.Fragment;
|
|
const ICYMIContextProvider = (ICYMIContextModule).ICYMIContextProvider;
|
|
const r9Props = {...(value4 ? {style: value5} : {})};
|
|
const value6 = ((Component) => <Component absolute />)(ThemedGradient);
|
|
const ThemeContextProvider = (NativeModule).ThemeContextProvider;
|
|
return (
|
|
<AppFreezer>
|
|
<ICYMIContextProvider>
|
|
{((Component) => <Component {...r9Props}>{value6}<ThemeContextProvider gradient={value3}><ICYMI inNestedNavigator={inNestedNavigator} key={'' + id} /></ThemeContextProvider></Component>)(r9)}
|
|
</ICYMIContextProvider>
|
|
</AppFreezer>
|
|
);
|
|
function _fun111817() { // fn#111817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15010:8483, offset: 0x023b3659, size: 24 bytes, params: 1, frame: 3
|
|
return env0_0 ? styles.containerOuterTablet : undefined;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun111780, 14813, [57, 31, 27, 4502, 1226, 1867, 9577, 9569, 14814, 1376, 33, 4501, 697, 14815, 8341,
|
|
13512, 9580, 4080, 14817, 1962, 4068, 14828, 4573, 1244, 7556, 6618, 7704, 3963, 5278, 14762, 14764, 5312, 9579,
|
|
1478, 1585, 1485, 4884, 566, 14744, 14848, 14851, 7014, 1365, 14838, 1484, 7230, 5080, 11179, 13574, 677, 14852,
|
|
14858, 14863, 14876, 14877, 14878, 14879, 14880, 14881, 14882, 14883, 7701, 14884, 8416, 477, 9871, 4003, 14885,
|
|
14816, 3868,
|
|
2]) /* metro module 14813, dependencies: [57, 31, 27, 4502, 1226, 1867, 9577, 9569, 14814, 1376, 33, 4501, 697, 14815, 8341, 13512, 9580, 4080, 14817, 1962, 4068, 14828, 4573, 1244, 7556, 6618, 7704, 3963, 5278, 14762, 14764, 5312, 9579, 1478, 1585, 1485, 4884, 566, 14744, 14848, 14851, 7014, 1365, 14838, 1484, 7230, 5080, 11179, 13574, 677, 14852, 14858, 14863, 14876, 14877, 14878, 14879, 14880, 14881, 14882, 14883, 7701, 14884, 8416, 477, 9871, 4003, 14885, 14816, 3868, 2] */;
|