Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,299 @@
|
||||
/* Metro module 11317; source: modules/messages/native/ChatBanner.tsx; dependencies: [31, 27, 4257, 4605, 11318, 661, 33, 4501, 697, 11319, 11320, 566, 21, 1357, 683, 4863, 6609, 4573, 1244, 4578, 6860, 7153, 5278, 5097, 8222, 2] */
|
||||
function _fun86326(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:6, offset: 0x01f90ec2, size: 713 bytes, params: 8, frame: 26
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const closure = OptInChannelBanner;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importAll(31) /* metro dependency 31 */;
|
||||
let value = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value.StyleSheet;
|
||||
const env0_4 = value.View;
|
||||
const gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */;
|
||||
const readStateStore = importDefault(4605) /* metro dependency 4605: ReadStateStore */;
|
||||
const env0_7 = (require(11318) /* metro dependency 11318: ChatOverlayConstants */).ChatOverlays;
|
||||
value = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_8 = value.AnalyticsObjectTypes;
|
||||
const env0_9 = value.AnalyticsObjects;
|
||||
const env0_10 = value.AnalyticEvents;
|
||||
const env0_11 = value.AnalyticsSections;
|
||||
value = require(33) /* metro dependency 33 */;
|
||||
const env0_12 = value.jsx;
|
||||
const env0_13 = value.jsxs;
|
||||
value = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = value.createStyles;
|
||||
object2 = {};
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
object2.threadBannerContainer = {'alignSelf': 'stretch', 'minHeight': 60, 'flexDirection': 'row',
|
||||
'paddingHorizontal': 16, 'paddingVertical': 12, 'alignItems': 'center', 'flexGrow': 0, 'zIndex': 100,
|
||||
backgroundColor: BACKGROUND_SURFACE_HIGH};
|
||||
object2.threadBannerTitle = {'flex': 1, 'lineHeight': 18};
|
||||
object2.threadBannerButton = {'flexGrow': 0, 'paddingVertical': 7, 'paddingHorizontal': 16, 'marginLeft': 16};
|
||||
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
||||
object2.newMessageBar = {'backgroundColor': null, 'flexDirection': 'row', 'justifyContent': 'center',
|
||||
'alignItems': 'center', 'overflow': 'hidden', 'zIndex': 100, 'minHeight': 45, backgroundColor: BACKGROUND_BRAND};
|
||||
object2.newMessageBarTextContainer = {'flex': 1, 'paddingLeft': 16, 'paddingVertical': 10};
|
||||
object2.newMessageBarCloseButton = {paddingHorizontal: 12};
|
||||
const object3 = {'flexDirection': 'row', 'justifyContent': 'space-between', 'alignItems': 'center',
|
||||
'overflow': 'hidden', 'padding': 8, 'paddingLeft': 16, 'paddingRight': 16, 'zIndex': 100};
|
||||
const CHAT_BANNER_BG = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BANNER_BG;
|
||||
object3.backgroundColor = CHAT_BANNER_BG;
|
||||
object3.borderBottomWidth = StyleSheet.hairlineWidth;
|
||||
let CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
|
||||
object3.borderBottomColor = CHAT_BORDER;
|
||||
object2.optInChannelBannerContainer = object3;
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.optInChannelBannerLegacyBorder = {borderBottomWidth: 1, borderBottomColor: BORDER_SUBTLE};
|
||||
const object4 = {};
|
||||
object4.borderTopWidth = StyleSheet.hairlineWidth;
|
||||
CHAT_BORDER = (importDefault(697) /* metro dependency 697: native */).colors.CHAT_BORDER;
|
||||
object4.borderTopColor = CHAT_BORDER;
|
||||
object2.topBorder = object4;
|
||||
object2.optInChannelBannerText = {flex: 1};
|
||||
object2.optInChannelBannerButtonContainer = {'flexShrink': 0, 'marginLeft': 8};
|
||||
const env0_14 = Reflect.apply(createStyles, value, [object2]);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/messages/native/ChatBanner.tsx');
|
||||
exports.default = ChatBanner;
|
||||
exports.OptInChannelBanner = closure;
|
||||
}
|
||||
|
||||
function OptInChannelBanner({channel, topBorder}) { // fn#86327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1536, offset: 0x01f9118b, size: 439 bytes, params: 2, frame: 25
|
||||
const styles = useStyles();
|
||||
const value2 = (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('OptInChannelBanner');
|
||||
env0_3.useEffect(_fun86328, [channel]);
|
||||
const value3 = env0_3.useCallback(_fun86329, [channel]);
|
||||
const items2 = [styles.optInChannelBannerContainer];
|
||||
items2[1] = value2 ? null : styles.optInChannelBannerLegacyBorder;
|
||||
topBorder = topBorder ? styles.topBorder : null;
|
||||
items2[2] = topBorder;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const text = <Text lineClamp={2} style={styles.optInChannelBannerText} variant="text-sm/semibold">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iOWmmB)}</Text>;
|
||||
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
||||
return (
|
||||
<View style={items2}>
|
||||
{text}
|
||||
<View style={styles.optInChannelBannerButtonContainer}>
|
||||
<Button
|
||||
onPress={value3}
|
||||
size="sm"
|
||||
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['TD/+zP'])}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function ArchivedLockedThreadChatBanner({channel}) { // fn#86330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2542, offset: 0x01f914a8, size: 420 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
env0_3.useEffect(_fun86331, [channel]);
|
||||
const value2 = (require(6860) /* metro dependency 6860: ThreadHooks */).useCanUnarchiveThread(channel);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const isForumPost2 = channel.isForumPost();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<View style={styles.threadBannerContainer}>
|
||||
<Text
|
||||
lineClamp={4}
|
||||
style={styles.threadBannerTitle}
|
||||
variant="text-sm/medium"
|
||||
color="text-default"
|
||||
>
|
||||
{isForumPost2 ? Reflect.apply(string, intl, [t['833FDn']]) : Reflect.apply(string, intl, [t.rEeodK])}
|
||||
</Text>
|
||||
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0dvvEi'])} onPress={onPress_86332} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function LockedThreadChatBanner({channel}) { // fn#86333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3488, offset: 0x01f9178f, size: 420 bytes, params: 2, frame: 27
|
||||
const styles = useStyles();
|
||||
env0_3.useEffect(_fun86334, [channel]);
|
||||
const value2 = (require(6860) /* metro dependency 6860: ThreadHooks */).useIsThreadModerator(channel);
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const isForumPost2 = channel.isForumPost();
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<View style={styles.threadBannerContainer}>
|
||||
<Text
|
||||
lineClamp={4}
|
||||
style={styles.threadBannerTitle}
|
||||
variant="text-sm/medium"
|
||||
color="text-default"
|
||||
>
|
||||
{isForumPost2 ? Reflect.apply(string, intl, [t.E7oO8u]) : Reflect.apply(string, intl, [t['V/JF2N']])}
|
||||
</Text>
|
||||
{value2 && <View style={styles.threadBannerButton}>{((Button) => <Button variant="secondary" size="sm" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.zA9d1J)} onPress={onPress_86335} />)((require(4578) /* metro dependency 4578: ButtonNative */).Button)}</View>}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function NewMessagesChatBar({channel, unreadCount, oldestUnreadTimestamp, handleScrollToNewMessages}) { // fn#86336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4413, offset: 0x01f919e4, size: 555 bytes, params: 2, frame: 36
|
||||
var r23;
|
||||
var r1;
|
||||
var r0;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
var items2;
|
||||
const styles = useStyles();
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStores = fluxModule.useStateFromStores;
|
||||
if (Reflect.apply(useStateFromStores, fluxModule, [[GatewayConnectionStore], function() {
|
||||
return GatewayConnectionStore.isConnected();
|
||||
}, []])) {
|
||||
if (unreadCount <= 0) {
|
||||
r1 = null;
|
||||
} else {
|
||||
r23 = ReadStateStore.isEstimated(channel.id) ? t.wvtbbG : t['BctFH/'];
|
||||
var viewBindingProps = {style: styles.newMessageBar};
|
||||
items2 = [<PressableOpacity accessibilityRole="button" style={styles.newMessageBarTextContainer} onPress={handleScrollToNewMessages}>{((Text) => <Text variant="text-sm/semibold" color="always-white">{intl.format(r23,
|
||||
|
||||
|
||||
{count: unreadCount,
|
||||
timestamp: oldestUnreadTimestamp})}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}</PressableOpacity>];
|
||||
items2[1] = <PressableOpacity style={styles.newMessageBarCloseButton} accessibilityRole="button" accessibilityLabel={intl.string(t.e6RscS)} onPress={function() {
|
||||
return require(dependencyMap[23]).ack(channel.id, {section: AnalyticsSections.NEW_MESSAGES_BANNER,
|
||||
object: AnalyticsObjects.MARK_CHANNEL_AS_READ_BUTTON, objectType: AnalyticsObjectTypes.ACK_MANUAL});
|
||||
}}>{((XSmallBoldIcon) => <XSmallBoldIcon size="sm" color={(importDefault(697) /* metro dependency 697: native */).colors.WHITE} />)((require(8222) /* metro dependency 8222: XSmallBoldIcon */).XSmallBoldIcon)}</PressableOpacity>;
|
||||
r1 = <View {...viewBindingProps}>{items2}</View>;
|
||||
}
|
||||
r0 = r1;
|
||||
} else {
|
||||
r0 = null;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function ChatBanner({channel, handleScrollToNewMessages}) { // fn#86339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5381, offset: 0x01f91c71, size: 330 bytes, params: 2, frame: 22
|
||||
const value2 = (importDefault(11319) /* metro dependency 11319: useShowChannelOptInNotice */)(channel);
|
||||
const value3 = (importDefault(11320) /* metro dependency 11320: useAllowedChatOverlays */)();
|
||||
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ReadStateStore], _fun86340,
|
||||
[channel.id]);
|
||||
const unreadCount = value4.unreadCount;
|
||||
return channel.isArchivedLockedThread() ? <ArchivedLockedThreadChatBanner channel={channel} /> : channel.isLockedThread() ? <LockedThreadChatBanner channel={channel} /> : unreadCount > 0 && value3.includes(ChatOverlays.NEW_MESSAGES) ? <NewMessagesChatBar unreadCount={unreadCount} oldestUnreadTimestamp={value4.oldestUnreadTimestamp} channel={channel} handleScrollToNewMessages={handleScrollToNewMessages} /> : value2 && value3.includes(ChatOverlays.OPT_IN_CHANNEL) ? <OptInChannelBanner channel={channel} /> : null;
|
||||
}
|
||||
|
||||
function _fun86328() { // fn#86328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1645, offset: 0x01f91342, size: 143 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
|
||||
channelBinding, [])]), value);
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
|
||||
object2['banner_type'] = 'channel_opt_in';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object2]);
|
||||
}
|
||||
|
||||
function _fun86329() { // fn#86329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:1854, offset: 0x01f913d1, size: 215 bytes, params: 1, frame: 24
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
|
||||
const object2 = {};
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = appAnalyticsUtilsModule.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, appAnalyticsUtilsModule,
|
||||
[Reflect.apply(getGuildId, channelBinding, [])]), undefined);
|
||||
const moduleValue2 = appAnalyticsUtilsModule;
|
||||
copyDataProperties(object2, moduleValue2.collectChannelAnalyticsMetadata(channelBinding), undefined);
|
||||
object2['banner_type'] = 'channel_opt_in';
|
||||
object2['cta_type'] = 'add channel';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
|
||||
const optInChannelsActionCreatorsModule = require(6609) /* metro dependency 6609: OptInChannelsActionCreators */;
|
||||
const setOptInChannel = optInChannelsActionCreatorsModule.setOptInChannel;
|
||||
const guild_id = channelBinding.guild_id;
|
||||
const id = channelBinding.id;
|
||||
const CHANNEL = AnalyticsSections.CHANNEL;
|
||||
Reflect.apply(setOptInChannel, optInChannelsActionCreatorsModule, [guild_id, id, true, {section: CHANNEL}]);
|
||||
}
|
||||
|
||||
function _fun86331() { // fn#86331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:2618, offset: 0x01f9164c, size: 141 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_VIEWED = AnalyticEvents.CHANNEL_BANNER_VIEWED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
|
||||
channelBinding, [])]), value);
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
|
||||
object2['banner_type'] = 'thread';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_VIEWED, object2]);
|
||||
}
|
||||
|
||||
function ArchivedLockedThreadChatBannerOnPress() { // fn#86332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:3250, owner: ArchivedLockedThreadChatBanner.onPress, offset: 0x01f916d9, size: 182 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
|
||||
channelBinding, [])]), value);
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
|
||||
object2['banner_type'] = 'thread';
|
||||
object2['cta_type'] = 'unarchive';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
|
||||
(importDefault(7153) /* metro dependency 7153: ThreadActionCreators */).unarchiveThread(channelBinding, false);
|
||||
}
|
||||
|
||||
function LockedThreadChatBannerOnPress() { // fn#86335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:4184, owner: LockedThreadChatBanner.onPress, offset: 0x01f91933, size: 177 bytes, params: 1, frame: 22
|
||||
let value = environment.__proto__;
|
||||
const defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
||||
const track = defaultImport.track;
|
||||
const CHANNEL_BANNER_CTA_CLICKED = AnalyticEvents.CHANNEL_BANNER_CTA_CLICKED;
|
||||
const object2 = {};
|
||||
value = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
const collectGuildAnalyticsMetadata = value.collectGuildAnalyticsMetadata;
|
||||
const channelBinding = channel;
|
||||
const getGuildId = channelBinding.getGuildId;
|
||||
copyDataProperties(object2, Reflect.apply(collectGuildAnalyticsMetadata, value, [Reflect.apply(getGuildId,
|
||||
channelBinding, [])]), value);
|
||||
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
|
||||
copyDataProperties(object2, appAnalyticsUtilsModule.collectChannelAnalyticsMetadata(channelBinding), value);
|
||||
object2['banner_type'] = 'thread';
|
||||
object2['cta_type'] = 'unlock';
|
||||
Reflect.apply(track, defaultImport, [CHANNEL_BANNER_CTA_CLICKED, object2]);
|
||||
(importDefault(7153) /* metro dependency 7153: ThreadActionCreators */).unlockThread(channelBinding);
|
||||
}
|
||||
|
||||
function _fun86340() { // fn#86340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11503:5513, offset: 0x01f91dbb, size: 114 bytes, params: 1, frame: 15
|
||||
var r1;
|
||||
let value = environment.__proto__;
|
||||
const getOldestUnreadTimestamp = ReadStateStore.getOldestUnreadTimestamp;
|
||||
const channelBinding = channel;
|
||||
const value3 = Reflect.apply(getOldestUnreadTimestamp, ReadStateStore, [channelBinding.id]);
|
||||
const object2 = {};
|
||||
object2.unreadCount = ReadStateStore.getUnreadCount(channelBinding.id);
|
||||
if (value3 !== 0) {
|
||||
r1 = value3;
|
||||
} else {
|
||||
value = importDefault(21) /* metro dependency 21: SnowflakeUtils */;
|
||||
value = value.extractTimestamp(channel.id);
|
||||
r1 = value;
|
||||
}
|
||||
object2.oldestUnreadTimestamp = r1;
|
||||
return object2;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user