decord/alpha/source/modules/channel/native/openChannelPicker.tsx

49 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 12134
// Function ID: 12135
2026-07-20 16:05:17 +00:00
// Name: openChannelPicker
2026-10-09 10:00:15 +00:00
// Dependencies: [4707, 2086, 5055, 12135, 2000, 1126, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-10-09 10:00:15 +00:00
// Module 12134 (openChannelPicker)
2026-10-03 08:58:59 +00:00
import intl2 from "intl" /* 1126 */;
2026-10-09 10:00:15 +00:00
import asyncRequire from "asyncRequire" /* 2000 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 5055 */;
import GuildChannelStore from "GuildChannelStore" /* 4707 */;
2026-10-08 09:57:35 +00:00
import GuildStore from "GuildStore" /* 2086 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const result = size.fileFinishedImporting("modules/channel/native/openChannelPicker.tsx");
2026-07-20 16:05:17 +00:00
export default function openChannelPicker(onClose) {
2026-10-03 08:58:59 +00:00
let channelType;
let filterFn;
let found;
let guildId;
let intl;
let obj2;
let selectedChannel;
2026-07-20 16:05:17 +00:00
({ guildId, filterFn } = onClose);
({ selectedChannel, channelType } = onClose);
if (filterFn === undefined) {
filterFn = function h() {
return true;
};
}
2026-10-03 08:58:59 +00:00
onClose = onClose.onClose;
const merged = Object.assign(onClose, Object.assign({ selectedChannel: 0, guildId: 0, channelType: 0, filterFn: 0, onClose: 0 }));
const guild = GuildStore.getGuild(guildId);
let items = GuildChannelStore.getChannels(guildId)[channelType];
2026-07-29 08:29:29 +00:00
if (items == null) {
2026-07-20 16:05:17 +00:00
items = [];
}
2026-10-03 08:58:59 +00:00
const openLazy = ActionSheetActionCreatorsDefault.openLazy;
const obj = { header: obj2, guild, channels: found.map((channel) => channel.channel), selectedChannel };
obj2 = { title: intl.string(intl2.t.r2ptsz), onClose };
ActionSheetActionCreatorsDefault;
2026-10-09 10:00:15 +00:00
const tmp4 = asyncRequire(12135, dependencyMap.paths);
2026-10-03 08:58:59 +00:00
intl = intl2.intl;
found = items.filter(filterFn);
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
2026-10-03 08:58:59 +00:00
openLazy(tmp4, "ChannelPicker", obj);
2026-07-20 16:05:17 +00:00
};