Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,83 @@
|
||||
/* Metro module 5102; source: modules/opt_in_channels/isOptInEnabled.tsx; dependencies: [1867, 3784, 4864, 1878, 661, 566, 2] */
|
||||
function _fun44537(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#44537, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5280:6, offset: 0x0117313c, size: 216 bytes, params: 8, frame: 19
|
||||
let env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
||||
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
|
||||
const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */;
|
||||
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
||||
const constantsModule = require(661) /* metro dependency 661: Constants */;
|
||||
const env0_6 = constantsModule.GuildFeatures;
|
||||
const env0_7 = constantsModule.Permissions;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/opt_in_channels/isOptInEnabled.tsx');
|
||||
exports.useOptInEnabledForGuild = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[5]).useStateFromStores([UserGuildSettingsStore, GuildStore, UserStore], _fun44539);
|
||||
};
|
||||
exports.isOptInEnabledForGuild = isOptInEnabledForGuild;
|
||||
exports.useShouldShowOnboardingAdminUpsellForGuild = function(a0) {
|
||||
var env0_0 = a0;
|
||||
return require(dependencyMap[5]).useStateFromStores([GuildStore, PermissionStore], _fun44542);
|
||||
};
|
||||
}
|
||||
|
||||
function useOptInEnabledForGuild(a0) { // fn#44538, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5280:282, offset: 0x01173214, size: 80 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore, GuildStore,
|
||||
UserStore], _fun44539);
|
||||
}
|
||||
|
||||
function isOptInEnabledForGuild(a0) { // fn#44540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5280:583, offset: 0x011732f3, size: 119 bytes, params: 2, frame: 15
|
||||
var r1;
|
||||
var features;
|
||||
const guild = GuildStore.getGuild(a0);
|
||||
const currentUser = UserStore.getCurrentUser();
|
||||
let r0 = a0 != null && guild != null && currentUser != null;
|
||||
if (r0) {
|
||||
features = guild.features;
|
||||
r1 = features.has(GuildFeatures.COMMUNITY) || currentUser.isStaff();
|
||||
r1 = r1 && UserGuildSettingsStore.isOptInEnabled(a0);
|
||||
r0 = r1;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function useShouldShowOnboardingAdminUpsellForGuild(a0) { // fn#44541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5280:805, offset: 0x0117336a, size: 72 bytes, params: 2, frame: 15
|
||||
const env0_0 = a0;
|
||||
return (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore, PermissionStore], _fun44542);
|
||||
}
|
||||
|
||||
function _fun44539() { // fn#44539, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5280:361, offset: 0x01173264, size: 143 bytes, params: 1, frame: 16
|
||||
var r3;
|
||||
let value = environment.__proto__;
|
||||
const isOptInEnabled = UserGuildSettingsStore.isOptInEnabled;
|
||||
const binding = env0_0;
|
||||
const isOptInEnabled2 = Reflect.apply(isOptInEnabled, UserGuildSettingsStore, [binding]);
|
||||
const guild = GuildStore.getGuild(binding);
|
||||
const value4 = undefined;
|
||||
const r5 = guild == null ? value4 : guild.features.has(GuildFeatures.COMMUNITY);
|
||||
const r1 = r5 != null && r5;
|
||||
value = UserStore.getCurrentUser();
|
||||
if (value == null) {
|
||||
r3 = value4;
|
||||
} else {
|
||||
value = value.isStaff();
|
||||
r3 = value;
|
||||
}
|
||||
return isOptInEnabled2 && (!r1 ? r3 != null && r3 : r1);
|
||||
}
|
||||
|
||||
function _fun44542() { // fn#44542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5280:901, offset: 0x011733b2, size: 140 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const guild = GuildStore.getGuild(env0_0);
|
||||
let can = PermissionStore.can;
|
||||
const MANAGE_GUILD = Permissions.MANAGE_GUILD;
|
||||
const value4 = Reflect.apply(can, PermissionStore, [MANAGE_GUILD, guild]);
|
||||
can = PermissionStore.can;
|
||||
const MANAGE_ROLES = Permissions.MANAGE_ROLES;
|
||||
const value5 = Reflect.apply(can, PermissionStore, [MANAGE_ROLES, guild]);
|
||||
const r5 = guild == null ? undefined : guild.features.has(GuildFeatures.GUILD_ONBOARDING_EVER_ENABLED);
|
||||
return guild != null && value4 && value5 && !(r5 != null && r5);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user