decord/source/modules/nuf_channels/native/NUFChannelsManager.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

147 lines
5.3 KiB
TypeScript

// Module ID: 13770
// Function ID: 13771
// Name: _initialize
// Dependencies: [2021, 1979, 4381, 1371, 1074, 4187, 510, 4404, 7118, 4418, 4417, 1384, 4527, 13771, 1896, 2]
// Module 13770 (_initialize)
import Storage3 from "Storage" /* 510 */;
import getRootNavigationRef from "getRootNavigationRef" /* 4418 */;
import initializeDefault from "initialize" /* 7118 */;
import closure_3 from "trackCommunicationDisabled" /* 2021 */;
import closure_4 from "createGuildRecordFromRust" /* 1979 */;
import closure_5 from "handleConnectionOpen" /* 4381 */;
import closure_6 from "mergeGuildAvatar" /* 1371 */;
import { GuildFeatures } from "ME" /* 1074 */;
import { GuildMemberFlags } from "GuildMemberFlags" /* 4187 */;
require = arg1;
let c9 = "2020_02_nuf_channels";
let c10 = "2020_02_nuf_voice_channels";
initializeDefault;
class NUFChannelsManager extends tmp2 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
closure_0 = applyArgumentsResult;
applyArgumentsResult.actions = {
LOGOUT() {
return applyArgumentsResult.clear();
}
};
applyArgumentsResult.handleNavigationStateChanged = function handleNavigationStateChanged() {
if ("guilds" === obj.getCurrentNavigationRouteName()) {
const guildId = closure_1_5.getGuildId();
const guild = closure_1_4.getGuild(guildId);
let tmp5 = null != guildId;
if (tmp5) {
let hasItem;
if (guild != null) {
const features = guild.features;
hasItem = features.has(closure_1_7.HUB);
}
tmp5 = !hasItem;
}
let selfMember = null;
if (null != guild) {
selfMember = closure_1_3.getSelfMember(guild.id);
}
let hasItem1 = null != guild;
if (hasItem1) {
const features2 = guild.features;
hasItem1 = features2.has(closure_1_7.GUILD_ONBOARDING);
}
if (hasItem1) {
let tmpResult = tmp(tmp2[11]);
let num;
if (selfMember != null) {
num = selfMember.flags;
}
if (num == null) {
num = 0;
}
hasItem1 = tmpResult.hasFlag(num, closure_1_8.STARTED_ONBOARDING);
}
if (hasItem1) {
tmpResult = tmp(tmp2[11]);
let num2;
if (selfMember != null) {
num2 = selfMember.flags;
}
if (num2 == null) {
num2 = 0;
}
hasItem1 = !tmpResult.hasFlag(num2, closure_1_8.COMPLETED_ONBOARDING);
}
if (tmp5) {
tmp5 = !hasItem1;
}
if (tmp5) {
const Storage = tmp(tmp2[6]).Storage;
const value = Storage.get(closure_1_9);
let isNewUserResult = !value;
if (!value) {
isNewUserResult = tmp(tmp2[7]).isNewUser(closure_1_6.getCurrentUser());
const tmpResult1 = tmp(tmp2[7]);
}
if (isNewUserResult) {
closure_1_1(tmp2[12]).openLazy(tmp(tmp2[14])(tmp2[13], tmp2.paths), "NUFChannelsActionSheet");
const Storage2 = tmp(tmp2[6]).Storage;
const result = Storage2.set(tmp12, true);
const obj5 = closure_1_1(tmp2[12]);
}
applyArgumentsResult.terminate();
tmp12 = closure_1_9;
}
}
};
applyArgumentsResult.requiresVoiceChannelsOnboard = function requiresVoiceChannelsOnboard() {
const Storage = applyArgumentsResult(510).Storage;
const value = Storage.get(closure_10);
let isNewUserResult = !value;
if (!value) {
isNewUserResult = applyArgumentsResult(4404).isNewUser(currentUser.getCurrentUser());
const tmpResult = applyArgumentsResult(4404);
}
return isNewUserResult;
};
applyArgumentsResult.handleVoiceChannelsOnboard = function handleVoiceChannelsOnboard() {
const Storage = applyArgumentsResult(510).Storage;
const result = Storage.set(closure_10, true);
};
applyArgumentsResult.clear = function clear() {
const Storage = applyArgumentsResult(510).Storage;
Storage.remove(closure_9);
const Storage2 = applyArgumentsResult(510).Storage;
Storage2.remove(closure_10);
};
return applyArgumentsResult;
}
}
const prototype = NUFChannelsManager.prototype;
prototype["_initialize"] = function _initialize() {
const Storage = Storage3.Storage;
const value = Storage.get(c9);
let isNewUserResult = !value;
if (!value) {
let tmpResult = tmp(4404);
isNewUserResult = tmpResult.isNewUser(currentUser.getCurrentUser());
}
if (isNewUserResult) {
tmpResult = tmp(4418);
const rootNavigationRef = tmpResult.getRootNavigationRef();
if (rootNavigationRef != null) {
const self = this;
rootNavigationRef.addListener("state", this.handleNavigationStateChanged);
}
}
};
prototype["_terminate"] = function _terminate() {
const rootNavigationRef = getRootNavigationRef.getRootNavigationRef();
if (rootNavigationRef != null) {
const self = this;
rootNavigationRef.removeListener("state", this.handleNavigationStateChanged);
}
};
const nUFChannelsManager = new NUFChannelsManager();
let result = require("set").fileFinishedImporting("modules/nuf_channels/native/NUFChannelsManager.tsx");
export default nUFChannelsManager;