63 lines
4.0 KiB
TypeScript
63 lines
4.0 KiB
TypeScript
/* Metro module 11966; source: modules/hub/useIsHubRealNamePromptShowing.tsx; dependencies: [31, 11967, 1945, 1867, 1878, 661, 11968, 566, 11969, 2] */
|
|
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import GuildMemberStore from '../../stores/GuildMemberStore.tsx'; /* Metro dependency 1945 */
|
|
import GuildPromptsStore from '../guild/GuildPromptsStore.tsx'; /* Metro dependency 11967 */
|
|
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as ConstantsModule2 from '../guild/Constants.tsx'; /* Metro dependency 11968 */
|
|
|
|
function _fun91856(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12152:6, offset: 0x020750ce, size: 229 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/hub/useIsHubRealNamePromptShowing.tsx');
|
|
exports.default = useIsHubRealNamePromptShowing;
|
|
function useIsHubRealNamePromptShowing(a0) { // fn#91857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12152:282, offset: 0x020751b3, size: 134 bytes, params: 2, frame: 16
|
|
const env0_0 = a0;
|
|
const value2 = (FluxModule).useStateFromStores([GuildStore, GuildPromptsStore,
|
|
UserStore, GuildMemberStore], _fun91858);
|
|
ReactModule.useEffect(_fun91859, [value2, a0]);
|
|
return value2 === true;
|
|
function _fun91858() { // fn#91858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12152:368, offset: 0x02075239, size: 184 bytes, params: 1, frame: 18
|
|
let value = environment.__proto__;
|
|
const guild = GuildStore.getGuild(env0_0);
|
|
const value4 = undefined;
|
|
if ((guild == null ? value4 : guild.features.has(GuildFeatures.HUB)) !== true) {
|
|
return null;
|
|
}
|
|
const guildPromptsStoreBinding = GuildPromptsStore;
|
|
const hasViewedPrompt = guildPromptsStoreBinding.hasViewedPrompt;
|
|
const REAL_NAME_PROMPT = GuildPrompts.REAL_NAME_PROMPT;
|
|
if (Reflect.apply(hasViewedPrompt, guildPromptsStoreBinding, [REAL_NAME_PROMPT, guild.id]) === true) {
|
|
return null;
|
|
}
|
|
const currentUser = UserStore.getCurrentUser();
|
|
if (currentUser == null) {
|
|
return null;
|
|
}
|
|
value = GuildMemberStore.getMember(guild.id, currentUser == null ? value4 : currentUser.id);
|
|
return (value == null ? value4 : value.nick) == null;
|
|
}
|
|
|
|
function _fun91859() { // fn#91859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12152:667, offset: 0x020752f1, size: 89 bytes, params: 1, frame: 14
|
|
var value4;
|
|
var defaultImport;
|
|
if (env0_0 != null && env0_1 != null) {
|
|
if (!env0_1) {
|
|
value4 = environment.__proto__;
|
|
defaultImport = importDefault(11969) /* metro dependency 11969: GuildPromptsActionCreators */;
|
|
defaultImport.viewPrompt(GuildPrompts.REAL_NAME_PROMPT, env0_0);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun91856, 11966, [31, 11967, 1945, 1867, 1878, 661, 11968, 566, 11969,
|
|
2]) /* metro module 11966, dependencies: [31, 11967, 1945, 1867, 1878, 661, 11968, 566, 11969, 2] */;
|