468 lines
25 KiB
TypeScript
468 lines
25 KiB
TypeScript
/* Metro module 15036; source: modules/search/native/hooks/useOnPressSearchItem.tsx; dependencies: [5, 31, 1379, 9674, 9615, 15037, 9614, 661, 1386, 11822, 11828, 1471, 3856, 1244, 8872, 3853, 1484, 15015, 15038, 1239, 9544, 4603, 4601, 8113, 1962, 7709, 5072, 9440, 6632, 6664, 8919, 1230, 9673, 2] */
|
|
function _fun113772(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:6, offset: 0x02405e0b, size: 483 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const addCurrentSearchQueryToSearchHistory = function(a0) {
|
|
addSearchHistoryItem_113773(a0, {type: SearchHistoryItemTypes.TEXT,
|
|
text: SearchQueryStore.getTextInputValue(a0),
|
|
tags: SearchQueryStore.getTags(a0)});
|
|
};
|
|
const closure = function() {
|
|
return _handleVoiceOrStageChannelConnectPress_113779.apply(this, arguments);
|
|
};
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
|
|
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
|
|
let value = require(9615) /* metro dependency 9615: SearchConstants */;
|
|
const env0_7 = value.SearchMediaTypes;
|
|
const env0_8 = value.SearchHistoryItemTypes;
|
|
const env0_9 = value.SearchQueryTagTypes;
|
|
const env0_10 = (require(15037) /* metro dependency 15037: SearchNavigatorConstants */).SearchNavigatorScreens;
|
|
const env0_11 = (require(9614) /* metro dependency 9614: TrackingConstants */).SearchFilterAddLocations;
|
|
value = require(661) /* metro dependency 661: Constants */;
|
|
const env0_12 = value.Routes;
|
|
const env0_13 = value.ComponentActions;
|
|
const env0_14 = value.ME;
|
|
const env0_15 = value.SearchTypes;
|
|
const env0_16 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useOnPressSearchItem.tsx');
|
|
exports.useOnPressSearchLink = useOnPressSearchLink;
|
|
exports.useOnPressMessageItem = useOnPressMessageItem;
|
|
exports.useOnPressMediaItem = useOnPressMediaItem;
|
|
exports.useOnPressGroupDMItem = useOnPressGroupDMItem;
|
|
exports.useOnPressDMItem = useOnPressDMItem;
|
|
exports.useOnPressGuildTextChannel = useOnPressGuildTextChannel;
|
|
exports.handleVoiceOrStageChannelConnectPress = closure;
|
|
exports.useOnPressGuildVoiceChannel = useOnPressGuildVoiceChannel;
|
|
exports.useOnPressSearchHistoryText = useOnPressSearchHistoryText;
|
|
}
|
|
|
|
function addSearchHistoryItem_113773(a0, a1) { // fn#113773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:380, offset: 0x02405fee, size: 96 bytes, params: 3, frame: 12
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const type = a0.type;
|
|
const DMS = SearchTypes.DMS;
|
|
if (DMS === type) {
|
|
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).delayUntilNavigationComplete(_fun113774);
|
|
} else if (SearchTypes.GUILD === type) {
|
|
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).delayUntilNavigationComplete(_fun113774);
|
|
}
|
|
}
|
|
|
|
function navigateToSearchPreview(a0, a1, a2, a3) { // fn#113776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:679, offset: 0x024060cb, size: 171 bytes, params: 5, frame: 16
|
|
var r6;
|
|
var environment;
|
|
var r2;
|
|
var navigate;
|
|
var object4;
|
|
var object5;
|
|
const env0_0 = a1;
|
|
const env0_1 = a3;
|
|
const object6 = {};
|
|
object6.channelId = a1.id;
|
|
let value = a1.getGuildId();
|
|
if (value != null) {
|
|
r2 = value;
|
|
} else {
|
|
value = environment;
|
|
r2 = ME;
|
|
r6 = value;
|
|
}
|
|
object6.guildId = r2;
|
|
object6.searchContext = a2;
|
|
if (a3 != null) {
|
|
navigate = a0.navigate;
|
|
object4 = {};
|
|
object4.screen = SearchNavigatorScreens.SEARCH_CHAT_PREVIEW;
|
|
object5 = {};
|
|
copyDataProperties(object5, object6, r6);
|
|
object5['onBeforeJumpToMessage'] = function() {
|
|
var ComponentDispatch = require(dependencyMap[19]).ComponentDispatch;
|
|
var HIDE_CHANNEL_DETAILS = ComponentActions.HIDE_CHANNEL_DETAILS;
|
|
ComponentDispatch.dispatch(HIDE_CHANNEL_DETAILS, {channelId: require.id,
|
|
screenIndex: importAll.screenIndex});
|
|
};
|
|
object4.params = object5;
|
|
Reflect.apply(navigate, a0, ['sidebar', object4]);
|
|
} else {
|
|
a0.navigate(SearchNavigatorScreens.SEARCH_CHAT_PREVIEW, object6);
|
|
}
|
|
}
|
|
|
|
function _handleVoiceOrStageChannelConnectPress_113779() { // fn#113779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1158, offset: 0x024061cd, size: 50 bytes, params: 1, frame: 14
|
|
return env0_3(_fun113781).apply(this, arguments);
|
|
}
|
|
|
|
function useOnPressSearchLink(a0) { // fn#113782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1556, offset: 0x024062a0, size: 44 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
return env0_4.useCallback(_fun113783, [a0]);
|
|
}
|
|
|
|
function useOnPressMessageItem({searchContext}) { // fn#113786, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1954, offset: 0x024063fe, size: 127 bytes, params: 2, frame: 18
|
|
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
|
const binding = env0_4;
|
|
const useContext = binding.useContext;
|
|
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
|
|
return binding.useCallback(_fun113787, [value2, searchContext, Reflect.apply(useContext, binding,
|
|
[SwipeForMemberListContext])]);
|
|
}
|
|
|
|
function useOnPressMediaItem({searchContext, allMediaResults, onEndReached, onEndReachedThreshold}) { // fn#113789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2332, offset: 0x0240651f, size: 169 bytes, params: 2, frame: 21
|
|
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
|
const binding = value2;
|
|
const useContext = binding.useContext;
|
|
const SwipeForMemberListContext = (require(15015) /* metro dependency 15015: SwipeForMemberListWrapper */).SwipeForMemberListContext;
|
|
return binding.useCallback(_fun113790, [searchContext, value2, Reflect.apply(useContext, binding,
|
|
[SwipeForMemberListContext]), allMediaResults, onEndReached, onEndReachedThreshold]);
|
|
}
|
|
|
|
function useOnPressGroupDMItem({searchContext}) { // fn#113793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3233, offset: 0x024067de, size: 90 bytes, params: 2, frame: 15
|
|
return env0_4.useCallback(_fun113794,
|
|
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(), searchContext]);
|
|
}
|
|
|
|
function useOnPressDMItem({searchContext}) { // fn#113796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3567, offset: 0x024068fe, size: 90 bytes, params: 2, frame: 15
|
|
return env0_4.useCallback(_fun113797,
|
|
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(), searchContext]);
|
|
}
|
|
|
|
function useOnPressGuildTextChannel({searchContext}) { // fn#113799, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3910, offset: 0x024069f4, size: 50 bytes, params: 2, frame: 14
|
|
return env0_4.useCallback(_fun113800, [searchContext]);
|
|
}
|
|
|
|
function useOnPressGuildVoiceChannel({searchContext}) { // fn#113802, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4334, offset: 0x02406af7, size: 109 bytes, params: 2, frame: 16
|
|
return env0_4.useCallback(_fun113809,
|
|
[(require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation(),
|
|
useOnPressGuildVoiceChannelUseVoiceChannelOnPressHandler(), searchContext]);
|
|
}
|
|
|
|
function useOnPressSearchHistoryText({searchContext}) { // fn#113811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5346, offset: 0x02406dca, size: 50 bytes, params: 2, frame: 14
|
|
return env0_4.useCallback(_fun113812, [searchContext]);
|
|
}
|
|
|
|
function _fun113774() { // fn#113774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:492, offset: 0x0240604e, size: 50 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__;
|
|
value = importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */;
|
|
return value.addSearchHistoryItem(env0_0, require);
|
|
}
|
|
|
|
function* _fun113781(a0) { // fn#113781, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1257, offset: 0x0240620a, size: 150 bytes, params: 2, frame: 17
|
|
if (true) {
|
|
value = a0.isGuildStageVoice();
|
|
var binding = env2_0;
|
|
var binding2 = env2_2;
|
|
var value4 = binding(binding2[24]);
|
|
if (value) {
|
|
yield value4(binding2[23], binding2.paths);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
value.connectAndOpen(a0);
|
|
} else {
|
|
yield value4(binding2[25], binding2.paths);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
value.openGuildVoiceModal(a0, 'Channel List');
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun113783(a0, a1) { // fn#113783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1611, offset: 0x024062cc, size: 261 bytes, params: 3, frame: 20
|
|
var environment;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var value4;
|
|
const env0_0 = a1;
|
|
let value = environment.__proto__;
|
|
addCurrentSearchQueryToSearchHistory(env0_0);
|
|
const value3 = (importDefault(1471) /* metro dependency 1471: URLUtils */).safeParseWithQuery(a0);
|
|
if (value3 == null) {
|
|
value = require(3856) /* metro dependency 3856: ToastUtils */;
|
|
value.presentFailedToast(intl.string(t.XiqzAp));
|
|
} else if (value3.protocol == null) {
|
|
value = require(3856) /* metro dependency 3856: ToastUtils */;
|
|
value.presentFailedToast(intl.string(t.XiqzAp));
|
|
} else if (value3.hostname != null) {
|
|
value4 = (importDefault(1471) /* metro dependency 1471: URLUtils */).format(value3);
|
|
value = require(8872) /* metro dependency 8872: MaskedLinkUtils */;
|
|
value.handleClick({href: value4, onConfirm: onConfirm_113784, trusted: function() {
|
|
return require;
|
|
}});
|
|
} else {
|
|
value = require(3856) /* metro dependency 3856: ToastUtils */;
|
|
value.presentFailedToast(intl.string(t.XiqzAp));
|
|
}
|
|
}
|
|
|
|
function _fun113787(a0, a1) { // fn#113787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2108, offset: 0x0240647d, size: 123 bytes, params: 3, frame: 17
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
if (ChannelStore.getChannel(a0) != null) {
|
|
addCurrentSearchQueryToSearchHistory(searchContext);
|
|
(importDefault(15038) /* metro dependency 15038: MessagePreviewActionCreators */).fetchMessages(a0, a1);
|
|
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113788);
|
|
}
|
|
}
|
|
|
|
function _fun113790(a0, a1) { // fn#113790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2541, offset: 0x024065c8, size: 333 bytes, params: 3, frame: 18
|
|
var environment;
|
|
var getChannel;
|
|
var channelId;
|
|
var defaultImport;
|
|
var fetchMessages;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
addCurrentSearchQueryToSearchHistory(searchContext);
|
|
const type = a0.type;
|
|
const AUDIO = SearchMediaTypes.AUDIO;
|
|
if (AUDIO === type) {
|
|
getChannel = ChannelStore.getChannel;
|
|
channelId = a0.channelId;
|
|
if (Reflect.apply(getChannel, ChannelStore, [channelId]) == null) {
|
|
return undefined;
|
|
}
|
|
defaultImport = importDefault(15038) /* metro dependency 15038: MessagePreviewActionCreators */;
|
|
fetchMessages = defaultImport.fetchMessages;
|
|
channelId = a0.channelId;
|
|
Reflect.apply(fetchMessages, defaultImport, [channelId, a0.messageId]);
|
|
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113791);
|
|
} else {
|
|
var ATTACHMENT = SearchMediaTypes.ATTACHMENT;
|
|
if (ATTACHMENT === type) {
|
|
var env0_3 = 0;
|
|
allMediaResults.forEach(_fun113792);
|
|
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialSources: [],
|
|
initialIndex: env0_3, onEndReached: onEndReached, onEndReachedThreshold: onEndReachedThreshold,
|
|
analyticsSource: 'Search', originViewOrOriginLayout: a1});
|
|
} else if (SearchMediaTypes.EMBED === type) {
|
|
var env0_3 = 0;
|
|
allMediaResults.forEach(_fun113792);
|
|
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialSources: [],
|
|
initialIndex: env0_3, onEndReached: onEndReached, onEndReachedThreshold: onEndReachedThreshold,
|
|
analyticsSource: 'Search', originViewOrOriginLayout: a1});
|
|
} else if (SearchMediaTypes.COMPONENT === type) {
|
|
var env0_3 = 0;
|
|
allMediaResults.forEach(_fun113792);
|
|
(require(9544) /* metro dependency 9544: openMediaModal */).openMediaModal({initialSources: [],
|
|
initialIndex: env0_3, onEndReached: onEndReached, onEndReachedThreshold: onEndReachedThreshold,
|
|
analyticsSource: 'Search', originViewOrOriginLayout: a1});
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun113794(a0) { // fn#113794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3336, offset: 0x02406838, size: 153 bytes, params: 2, frame: 17
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const value = environment.__proto__;
|
|
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
|
|
const searchContextBinding = searchContext;
|
|
const GROUP_DM = SearchHistoryItemTypes.GROUP_DM;
|
|
addSearchHistoryItem_113773Binding(searchContextBinding, {type: GROUP_DM, channelId: a0});
|
|
const parent = env0_1.getParent();
|
|
if (parent != null) {
|
|
parent.goBack();
|
|
}
|
|
(importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).preload(ME, a0);
|
|
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113795);
|
|
}
|
|
|
|
function _fun113797(a0, a1) { // fn#113797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3665, offset: 0x02406958, size: 156 bytes, params: 3, frame: 17
|
|
var environment;
|
|
const env0_0 = a1;
|
|
const value = environment.__proto__;
|
|
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
|
|
const searchContextBinding = searchContext;
|
|
const DM = SearchHistoryItemTypes.DM;
|
|
addSearchHistoryItem_113773Binding(searchContextBinding, {type: DM, userId: a0});
|
|
const parent = env0_1.getParent();
|
|
if (parent != null) {
|
|
parent.goBack();
|
|
}
|
|
(importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).preload(ME, a1);
|
|
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113798);
|
|
return a1;
|
|
}
|
|
|
|
function _fun113800(a0) { // fn#113800, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3987, offset: 0x02406a26, size: 159 bytes, params: 2, frame: 18
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const channel = ChannelStore.getChannel(a0);
|
|
if (channel == null) {
|
|
return null;
|
|
}
|
|
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
|
|
const searchContextBinding = searchContext;
|
|
const GUILD_TEXT_CHANNEL = SearchHistoryItemTypes.GUILD_TEXT_CHANNEL;
|
|
addSearchHistoryItem_113773Binding(searchContextBinding, {type: GUILD_TEXT_CHANNEL, channelId: channel.id});
|
|
const defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */;
|
|
defaultImport.preload(channel.guild_id, channel.id);
|
|
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113801);
|
|
}
|
|
|
|
function useOnPressGuildVoiceChannelUseVoiceChannelOnPressHandler() { // fn#113803, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4423, owner: useOnPressGuildVoiceChannel.useVoiceChannelOnPressHandler, offset: 0x02406b64, size: 39 bytes, params: 1, frame: 13
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
return env1_4.useCallback(_fun113804(), []);
|
|
}
|
|
|
|
function _fun113809(a0) { // fn#113809, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5098, offset: 0x02406d38, size: 146 bytes, params: 2, frame: 18
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
const channel = ChannelStore.getChannel(a0);
|
|
if (channel == null) {
|
|
return null;
|
|
}
|
|
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
|
|
const searchContextBinding = searchContext;
|
|
const GUILD_VOICE_CHANNEL = SearchHistoryItemTypes.GUILD_VOICE_CHANNEL;
|
|
addSearchHistoryItem_113773Binding(searchContextBinding, {type: GUILD_VOICE_CHANNEL, channelId: channel.id});
|
|
const parent = env0_1.getParent();
|
|
if (parent != null) {
|
|
parent.goBack();
|
|
}
|
|
(require(11822) /* metro dependency 11822: SearchPlatformUtils */).performKeyboardAwareNavigation(_fun113810);
|
|
}
|
|
|
|
function _fun113812(a0, a1) { // fn#113812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5424, offset: 0x02406dfc, size: 150 bytes, params: 3, frame: 18
|
|
var environment;
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const value = environment.__proto__;
|
|
const addSearchHistoryItem_113773Binding = addSearchHistoryItem_113773;
|
|
const searchContextBinding = searchContext;
|
|
const TEXT = SearchHistoryItemTypes.TEXT;
|
|
addSearchHistoryItem_113773Binding(searchContextBinding, {type: TEXT, text: a0, tags: a1});
|
|
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).updateSearchQuery(searchContextBinding,
|
|
_fun113813);
|
|
(importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).fetchInitialMessages(searchContextBinding);
|
|
if (a1 != null) {
|
|
a1.forEach(_fun113814);
|
|
}
|
|
}
|
|
|
|
function onConfirm_113784() { // fn#113784, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:1808, offset: 0x024063d1, size: 45 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (importDefault(3853) /* metro dependency 3853: Linking */).openURL(env0_1);
|
|
}
|
|
|
|
function _fun113788() { // fn#113788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2256, offset: 0x024064f8, size: 39 bytes, params: 1, frame: 17
|
|
navigateToSearchPreview(env1_1, env0_0, searchContext, env1_2);
|
|
}
|
|
|
|
function _fun113791() { // fn#113791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2767, offset: 0x02406715, size: 39 bytes, params: 1, frame: 17
|
|
navigateToSearchPreview(env1_4, env0_1, searchContext, env1_5);
|
|
}
|
|
|
|
function _fun113792(a0) { // fn#113792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:2884, offset: 0x0240673c, size: 162 bytes, params: 2, frame: 13
|
|
var binding;
|
|
const type = a0.type;
|
|
const value = environment.__proto__.__proto__;
|
|
const ATTACHMENT = SearchMediaTypes.ATTACHMENT;
|
|
if (!(type !== ATTACHMENT && a0.type !== SearchMediaTypes.EMBED && a0.type !== SearchMediaTypes.COMPONENT)) {
|
|
binding = env0_4;
|
|
binding.push(a0.sources);
|
|
if (a0.messageId === env0_0.messageId && a0.mediaIndex === env0_0.mediaIndex) {
|
|
}
|
|
binding = env0_2;
|
|
env0_2 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
|
|
}
|
|
}
|
|
|
|
function _fun113795() { // fn#113795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:3498, offset: 0x024068d1, size: 45 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__.__proto__;
|
|
(require(4601) /* metro dependency 4601: transitionToChannel */).transitionToChannel(env0_0);
|
|
}
|
|
|
|
function _fun113801() { // fn#113801, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4177, offset: 0x02406ac5, size: 50 bytes, params: 1, frame: 11
|
|
let value = environment.__proto__.__proto__;
|
|
value = require(4601) /* metro dependency 4601: transitionToChannel */;
|
|
return value.transitionToChannel(env0_0.id);
|
|
}
|
|
|
|
function _fun113804() { // fn#113804, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4485, offset: 0x02406b8b, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env2_3(_fun113806);
|
|
return _fun113808;
|
|
}
|
|
|
|
function _fun113813(a0) { // fn#113813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5514, offset: 0x02406e92, size: 50 bytes, params: 2, frame: 12
|
|
if (require != null) {
|
|
a0.setTags(require);
|
|
}
|
|
a0.setTextInputValue(env0_0);
|
|
}
|
|
|
|
function _fun113814(a0) { // fn#113814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:5618, offset: 0x02406ec4, size: 101 bytes, params: 2, frame: 14
|
|
var defaultImport;
|
|
var trackSearchFilterAdd;
|
|
var value2;
|
|
const type = a0.type;
|
|
const COMPLETE = SearchQueryTagTypes.COMPLETE;
|
|
if (type === COMPLETE) {
|
|
defaultImport = importDefault(9673) /* metro dependency 9673: Tracking */;
|
|
trackSearchFilterAdd = defaultImport.trackSearchFilterAdd;
|
|
value2 = environment.__proto__;
|
|
Reflect.apply(trackSearchFilterAdd, defaultImport, [{searchContext: searchContext,
|
|
searchTokenType: a0.searchTokenType, location: SearchFilterAddLocations.SEARCH_HISTORY}]);
|
|
}
|
|
}
|
|
|
|
function* _fun113806(a0) { // fn#113806, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15233:4505, offset: 0x02406bba, size: 359 bytes, params: 2, frame: 21
|
|
var environment;
|
|
var r3;
|
|
var value9;
|
|
var transitionTo;
|
|
var binding2;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
const env0_0 = a0;
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
let binding = env4_0;
|
|
const value3 = undefined;
|
|
const value4 = binding(env4_2[26]);
|
|
if (value4.maybeOpenAgeGateForVoiceChannel(a0.id)) {
|
|
return value3;
|
|
}
|
|
const value5 = env4_0(env4_2[27]);
|
|
if (value5.maybeOpenSpoilerGateForVoiceChannel(a0.id)) {
|
|
return value3;
|
|
}
|
|
const value6 = env4_0(env4_2[28]);
|
|
const getChannelRoleSubscriptionStatus = value6.getChannelRoleSubscriptionStatus;
|
|
const needSubscriptionToAccess = Reflect.apply(getChannelRoleSubscriptionStatus, value6,
|
|
[a0.id]).needSubscriptionToAccess;
|
|
const guildId = a0.getGuildId();
|
|
if (guildId != null) {
|
|
var value8 = env4_0(env4_2[29]);
|
|
if (value8.shouldShowMembershipVerificationGate(guildId)) {
|
|
binding = env4_0;
|
|
binding2 = env4_2;
|
|
value = binding(binding2[24]);
|
|
yield value(binding2[30], binding2.paths);
|
|
value = undefined;
|
|
if (false) {
|
|
return value;
|
|
}
|
|
value = value.openMemberVerificationModal(guildId, _fun113807);
|
|
return value;
|
|
}
|
|
}
|
|
if (needSubscriptionToAccess) {
|
|
binding = env4_0;
|
|
value9 = binding(env4_2[31]);
|
|
transitionTo = value9.transitionTo;
|
|
binding = env4_12;
|
|
r3 = Reflect.apply(transitionTo, value9, [binding.CHANNEL(a0.guild_id, env4_16.ROLE_SUBSCRIPTIONS)]);
|
|
} else {
|
|
env4_20(a0);
|
|
r3 = value3;
|
|
}
|
|
return r3;
|
|
}
|
|
|