63 lines
3.6 KiB
TypeScript
63 lines
3.6 KiB
TypeScript
/* Metro module 15112; source: modules/search/native/hooks/useAutoSearchMembersTab.tsx; dependencies: [31, 9674, 11823, 661, 22, 9675, 11828, 11822, 2] */
|
|
function _fun115171(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:6, offset: 0x0245643a, size: 181 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const searchQueryStore = importDefault(9674) /* metro dependency 9674: SearchQueryStore */;
|
|
const env0_5 = (require(11823) /* metro dependency 11823: SearchPlatformConstants */).SEARCH_TEXT_INPUT_DEBOUNCE_TIME;
|
|
const env0_6 = (require(661) /* metro dependency 661: Constants */).SearchTypes;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/search/native/hooks/useAutoSearchMembersTab.tsx');
|
|
exports.useAutoSearchMembersTab = useAutoSearchMembersTab;
|
|
}
|
|
|
|
function useAutoSearchMembersTab(a0, a1) { // fn#115172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:295, offset: 0x024564ef, size: 83 bytes, params: 3, frame: 15
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const binding = env0_3;
|
|
binding.useEffect(_fun115173, [a1, a0]);
|
|
binding.useEffect(function() {
|
|
return _fun115176;
|
|
}, [a0]);
|
|
}
|
|
|
|
function _fun115173() { // fn#115173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:346, offset: 0x02456542, size: 98 bytes, params: 1, frame: 17
|
|
if (require) {
|
|
return undefined;
|
|
}
|
|
return (importDefault(11822) /* metro dependency 11822: SearchPlatformUtils */).subscribeTextInputValue(env0_0,
|
|
(require(22) /* metro dependency 22 */).debounce(_fun115174, SEARCH_TEXT_INPUT_DEBOUNCE_TIME));
|
|
}
|
|
|
|
function _fun115175() { // fn#115175, offset: 0x0245668f, size: 11 bytes, params: 1, frame: 1
|
|
return _fun115176;
|
|
}
|
|
|
|
function _fun115174(a0) { // fn#115174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:382, offset: 0x024565a4, size: 235 bytes, params: 2, frame: 19
|
|
var r4;
|
|
var guildIdFromSearchContext;
|
|
var value4;
|
|
var binding;
|
|
var channelIds;
|
|
if (!SearchQueryStore.isAutocompleteVisible(env1_0)) {
|
|
guildIdFromSearchContext = (require(9675) /* metro dependency 9675: SearchUtils */).getGuildIdFromSearchContext(env1_0);
|
|
value4 = null;
|
|
if (value4 != guildIdFromSearchContext) {
|
|
binding = env1_0;
|
|
channelIds = SearchQueryStore.getChannelIds(binding);
|
|
r4 = channelIds.size === 0 || channelIds.size !== 1 ? value4 : global.Array.from(channelIds)[0];
|
|
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).searchGuildMemberTab({searchContext: binding,
|
|
|
|
|
|
searchQueryString: a0, guildId: guildIdFromSearchContext, channelId: r4,
|
|
threadId: binding.type !== SearchTypes.THREAD ? value4 : r4});
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun115176() { // fn#115176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15309:805, offset: 0x0245669a, size: 45 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__.__proto__;
|
|
(importDefault(11828) /* metro dependency 11828: SearchPlatformActionCreators */).cleanupGuildMemberTab(env1_0);
|
|
}
|
|
|