70 lines
4.5 KiB
TypeScript
70 lines
4.5 KiB
TypeScript
/* Metro module 15112; source: modules/search/native/hooks/useAutoSearchMembersTab.tsx; dependencies: [31, 9674, 11823, 661, 22, 9675, 11828, 11822, 2] */
|
|
import SearchQueryStore from '../stores/SearchQueryStore.tsx'; /* Metro dependency 9674 */
|
|
import SearchPlatformUtils from '../SearchPlatformUtils.tsx'; /* Metro dependency 11822 */
|
|
import SearchPlatformActionCreators from '../SearchPlatformActionCreators.tsx'; /* Metro dependency 11828 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as Module00022Module from '../../../../by-id/module-00022.js'; /* Metro dependency 22 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as SearchPlatformConstantsModule from '../SearchPlatformConstants.tsx'; /* Metro dependency 11823 */
|
|
|
|
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});
|
|
(FileImportTrackerModule).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;
|
|
ReactModule.useEffect(_fun115173, [a1, a0]);
|
|
ReactModule.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 (SearchPlatformUtils).subscribeTextInputValue(env0_0,
|
|
(Module00022Module).debounce(_fun115174, SEARCH_TEXT_INPUT_DEBOUNCE_TIME));
|
|
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;
|
|
const searchQueryStoreBinding = SearchQueryStore;
|
|
if (!searchQueryStoreBinding.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 _fun115175() { // fn#115175, offset: 0x0245668f, size: 11 bytes, params: 1, frame: 1
|
|
return _fun115176;
|
|
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__;
|
|
(SearchPlatformActionCreators).cleanupGuildMemberTab(env1_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun115171, 15112, [31, 9674, 11823, 661, 22, 9675, 11828, 11822,
|
|
2]) /* metro module 15112, dependencies: [31, 9674, 11823, 661, 22, 9675, 11828, 11822, 2] */;
|