decord/stable/source/modules/media_channel/useShouldHideMediaOptions.tsx
github-actions 57c2214117 chore: update source for stable 347.12
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
2026-09-29 21:26:22 +00:00

44 lines
1.3 KiB
TypeScript

// Module ID: 11942
// Function ID: 11943
// Name: useShouldHideMediaOptions
// Dependencies: [2041, 2048, 563, 2]
// Exports: default
// Module 11942 (useShouldHideMediaOptions)
import ChannelStore from "ChannelStore" /* 2041 */;
const require = globalThis.__r;
const require = fn;
const ChannelFlags = fn(2048).ChannelFlags;
const size = fn(2);
const result = size.fileFinishedImporting("modules/media_channel/useShouldHideMediaOptions.tsx");
export default function useShouldHideMediaOptions(arg0) {
_require = arg0;
const items = [ChannelStore];
const stateFromStores = require("useStateFromStores").useStateFromStores(items, () => {
const channel = ChannelStore.getChannel(closure_0);
let parent_id;
if (channel != null) {
parent_id = channel.parent_id;
}
let channel1 = null;
if (null != parent_id) {
channel1 = null;
if (channel.isForumPost()) {
let parent_id1;
if (channel != null) {
parent_id1 = channel.parent_id;
}
channel1 = ChannelStore.getChannel(parent_id1);
}
}
return channel1;
});
let hasFlagResult;
if (stateFromStores != null) {
hasFlagResult = stateFromStores.hasFlag(ChannelFlags.HIDE_MEDIA_DOWNLOAD_OPTIONS);
}
return true === hasFlagResult;
};