Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
61 lines
2 KiB
TypeScript
61 lines
2 KiB
TypeScript
// Module ID: 11518
|
|
// Function ID: 11519
|
|
// Name: useShowChannelOptInNotice
|
|
// Dependencies: [4788, 1074, 1964, 7609, 504, 7296, 2]
|
|
// Exports: default
|
|
|
|
// Module 11518 (useShowChannelOptInNotice)
|
|
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4788 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
const require = fn;
|
|
const NULL_STRING_GUILD_ID = fn(1074).NULL_STRING_GUILD_ID;
|
|
const ChannelFlags = fn(1964).ChannelFlags;
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/opt_in_channels/useShowChannelOptInNotice.tsx");
|
|
|
|
export default function useShowChannelOptInNotice(getGuildId) {
|
|
_require = getGuildId;
|
|
let guildId;
|
|
if (getGuildId != null) {
|
|
guildId = getGuildId.getGuildId();
|
|
}
|
|
let optInEnabledForGuild = require("isOptInEnabled").useOptInEnabledForGuild(null != guildId ? getGuildId.guild_id : NULL_STRING_GUILD_ID);
|
|
const obj = require("isOptInEnabled");
|
|
const items = [UserGuildSettingsStore];
|
|
const stateFromStores = require("initialize").useStateFromStores(items, () => {
|
|
let result = null != closure_0;
|
|
if (result) {
|
|
result = UserGuildSettingsStore.isChannelRecordOrParentOptedIn(tmp);
|
|
}
|
|
return result;
|
|
});
|
|
const tmpResult = require("initialize");
|
|
let guild_id;
|
|
if (getGuildId != null) {
|
|
guild_id = getGuildId.guild_id;
|
|
}
|
|
if (guild_id == null) {
|
|
guild_id = NULL_STRING_GUILD_ID;
|
|
}
|
|
let canSeeOnboardingHome = require("OnboardingHomeUtils").useCanSeeOnboardingHome(guild_id);
|
|
if (null == getGuildId) {
|
|
return false;
|
|
} else {
|
|
if (canSeeOnboardingHome) {
|
|
canSeeOnboardingHome = getGuildId.hasFlag(ChannelFlags.IS_GUILD_RESOURCE_CHANNEL);
|
|
}
|
|
if (optInEnabledForGuild) {
|
|
optInEnabledForGuild = !canSeeOnboardingHome;
|
|
}
|
|
if (optInEnabledForGuild) {
|
|
optInEnabledForGuild = !stateFromStores;
|
|
}
|
|
if (optInEnabledForGuild) {
|
|
optInEnabledForGuild = !getGuildId.isThread();
|
|
}
|
|
return optInEnabledForGuild;
|
|
}
|
|
const tmpResult2 = require("OnboardingHomeUtils");
|
|
};
|