decord/beta/source/modules/channel/native/openChannelPicker.tsx
github-actions 30c0bb2ec3 chore: update source for beta 347.10
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
2026-09-24 16:03:38 +00:00

45 lines
1.7 KiB
TypeScript

// Module ID: 12645
// Function ID: 12646
// Name: openChannelPicker
// Dependencies: [2100, 2067, 4757, 12646, 1984, 1119, 2]
// Exports: default
// Module 12645 (openChannelPicker)
import util from "util" /* 1119 */;
import asyncRequireImpl from "asyncRequireImpl" /* 1984 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4757 */;
import GuildChannelStore from "GuildChannelStore" /* 2100 */;
import GuildStore from "GuildStore" /* 2067 */;
require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/channel/native/openChannelPicker.tsx");
export default function openChannelPicker(onClose) {
({ guildId, filterFn } = onClose);
({ selectedChannel, channelType } = onClose);
if (filterFn === undefined) {
filterFn = function h() {
return true;
};
}
const merged = Object.assign(onClose, Object.assign({ selectedChannel: 0, guildId: 0, channelType: 0, filterFn: 0, onClose: 0 }));
guild = GuildStore.getGuild(guildId);
let items = GuildChannelStore.getChannels(guildId)[channelType];
if (items == null) {
items = [];
}
const obj2 = { header: null, guild: null, channels: null, selectedChannel: null };
const obj3 = { title: null, onClose: null };
const obj = ActionSheetActionCreatorsDefault;
const intl = util.intl;
obj3.title = intl.string(util.t.r2ptsz);
obj3.onClose = onClose.onClose;
obj2.header = obj3;
obj2.guild = guild;
const found = items.filter(filterFn);
obj2.channels = found.map((channel) => channel.channel);
obj2.selectedChannel = selectedChannel;
const merged1 = Object.assign(merged);
obj.openLazy(asyncRequireImpl(12646, dependencyMap.paths), "ChannelPicker", obj2);
};