78 lines
5.2 KiB
TypeScript
78 lines
5.2 KiB
TypeScript
/* Metro module 9162; source: modules/instant_invite/native/useInviteSuggestionRows.tsx; dependencies: [57, 31, 1945, 1867, 9163, 4118, 661, 482, 566, 683, 9164, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import GuildMemberStore from '../../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
|
|
import InviteSuggestionsStore from '../../../stores/InviteSuggestionsStore.tsx'; /* Metro dependency 9163 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as ConstantsModule from '../../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
|
|
import * as ConstantsModule2 from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as ConstantsModule3 from '../Constants.tsx'; /* Metro dependency 4118 */
|
|
import * as InviteSuggestionsActionCreatorsModule from '../../../actions/InviteSuggestionsActionCreators.tsx'; /* Metro dependency 9164 */
|
|
|
|
function _fun71841(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#71841, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:6, offset: 0x01d2f376, size: 251 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/instant_invite/native/useInviteSuggestionRows.tsx');
|
|
exports.default = _default_71842;
|
|
function _default_71842(a0, a1, a2, a3) { // fn#71842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:228, offset: 0x01d2f471, size: 225 bytes, params: 5, frame: 20
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const env0_3 = a3;
|
|
const inviteSuggestionRows = (require(566) /* metro dependency 566: flux */).useStateFromStores([InviteSuggestionsStore],
|
|
function() {
|
|
return InviteSuggestionsStore.getInviteSuggestionRows();
|
|
});
|
|
const binding = inviteSuggestionRows;
|
|
const value = env0_3(binding.useState(true), 2);
|
|
const property = value[0];
|
|
const env0_6 = value[1];
|
|
binding.useEffect(_fun71844, [inviteSuggestionRows, a0, property, a3, a1]);
|
|
binding.useEffect(_fun71845, [a0, a2]);
|
|
return {rows: inviteSuggestionRows, isFetchingRows: property};
|
|
function _fun71844() { // fn#71844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:372, offset: 0x01d2f565, size: 164 bytes, params: 1, frame: 16
|
|
var value2;
|
|
var initialCounts;
|
|
var defaultImport;
|
|
if (!env0_5) {
|
|
value2 = environment.__proto__;
|
|
initialCounts = InviteSuggestionsStore.getInitialCounts();
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport.track(AnalyticEvents.INVITE_SUGGESTION_OPENED, {location: require,
|
|
num_suggestions: inviteSuggestionRows.length, guild_id: env0_0.guild_id,
|
|
num_friends: initialCounts.numFriends,
|
|
num_dms: initialCounts.numDms, num_group_dms: initialCounts.numGroupDms, application_id: importAll});
|
|
}
|
|
}
|
|
|
|
function _fun71845() { // fn#71845, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:627, offset: 0x01d2f609, size: 214 bytes, params: 1, frame: 18
|
|
env0_6(true);
|
|
const EMBEDDED_APPLICATION = InviteTargetTypes.EMBEDDED_APPLICATION;
|
|
const r8 = importDefault === EMBEDDED_APPLICATION ? [] : GuildMemberStore.getMemberIds(env0_0.guild_id);
|
|
const loadInviteSuggestions = InviteSuggestionsActionCreatorsModule.loadInviteSuggestions;
|
|
const Set = global.Set;
|
|
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
|
|
const set = new Set(r8);
|
|
const guildStoreBinding = GuildStore;
|
|
const getGuild = guildStoreBinding.getGuild;
|
|
const binding = env0_0;
|
|
let value = Reflect.apply(loadInviteSuggestions, InviteSuggestionsActionCreatorsModule,
|
|
[{omitUserIds: set instanceof Object ? set : value4, guild: Reflect.apply(getGuild, guildStoreBinding,
|
|
[binding.guild_id]), channel: binding, inviteTargetType: importDefault}]);
|
|
value = value.catch(NOOP_NULL);
|
|
value.finally(_fun71846);
|
|
function _fun71846() { // fn#71846, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9347:834, offset: 0x0171ce63, size: 18 bytes, params: 1, frame: 11
|
|
env1_6(false);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun71841, 9162, [57, 31, 1945, 1867, 9163, 4118, 661, 482, 566, 683, 9164,
|
|
2]) /* metro module 9162, dependencies: [57, 31, 1945, 1867, 9163, 4118, 661, 482, 566, 683, 9164, 2] */;
|