Files
discord-decomp/sources/modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx
T
2026-07-27 16:20:00 +03:00

53 lines
2.9 KiB
TypeScript

/* Metro module 15866; source: modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx; dependencies: [1935, 3784, 12133, 566, 2] */
function _fun122094(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#122094, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16074:6, offset: 0x02559c90, size: 168 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = getChannelsAllowedToUnlink;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const guildChannelStore = importDefault(1935) /* metro dependency 1935: GuildChannelStore */;
const env0_3 = (require(1935) /* metro dependency 1935: GuildChannelStore */).GUILD_SELECTABLE_CHANNELS_KEY;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/lobbies/hooks/useChannelsAllowedToUnlink.tsx');
exports.getChannelsAllowedToUnlink = closure;
exports.useChannelsAllowedToUnlink = function(a0) {
var env0_0 = a0;
return require(dependencyMap[3]).useStateFromStoresArray([PermissionStore, GuildChannelStore], _fun122099);
};
}
function getChannelsAllowedToUnlink(a0) { // fn#122095, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16074:156, offset: 0x02559d38, size: 109 bytes, params: 2, frame: 14
var r0;
let value = a1;
const value2 = a2;
const r2 = value !== undefined ? value : GuildChannelStore;
if (value2 !== undefined) {
}
if (a0 == null) {
r0 = [];
} else {
value = r2.getChannels(a0);
value = value[GUILD_SELECTABLE_CHANNELS_KEY].filter(_fun122096);
value = value.map(function(a0) {
return a0.channel;
});
r0 = value;
}
return r0;
}
function useChannelsAllowedToUnlink(a0) { // fn#122098, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16074:488, offset: 0x02559ddb, size: 75 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresArray([PermissionStore, GuildChannelStore],
_fun122099);
}
function _fun122096({channel}) { // fn#122096, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16074:249, offset: 0x02559da5, size: 54 bytes, params: 2, frame: 13
const value = environment.__proto__;
return (require(12133) /* metro dependency 12133: LobbyUtils */).canUnlinkLobbyChannel(channel, env0_0);
}
function _fun122099() { // fn#122099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16074:573, offset: 0x02559e26, size: 33 bytes, params: 1, frame: 15
return getChannelsAllowedToUnlink(env0_0, GuildChannelStore, PermissionStore);
}