decord/source/modules/media_channel/useShouldHideMediaOptions.tsx

42 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 9494
2026-07-27 11:26:19 +00:00
// Function ID: 74076
2026-07-20 16:05:17 +00:00
// Name: useShouldHideMediaOptions
2026-07-23 10:11:24 +00:00
// Dependencies: [1348, 1355, 624, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-25 08:10:48 +00:00
// Module 9494 (useShouldHideMediaOptions)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import { ChannelFlags } from "set";
const require = arg1;
const result = require("defaultAreStatesEqual").fileFinishedImporting("modules/media_channel/useShouldHideMediaOptions.tsx");
2026-07-20 16:05:17 +00:00
export default function useShouldHideMediaOptions(arg0) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-07-20 16:05:17 +00:00
let hasFlagResult;
2026-07-23 10:11:24 +00:00
const items = [_isNativeReflectConstruct];
const stateFromStores = _require(624).useStateFromStores(items, () => {
const channel = outer1_2.getChannel(closure_0);
2026-07-20 16:05:17 +00:00
let parent_id;
if (null != channel) {
parent_id = channel.parent_id;
}
let channel1 = null;
if (null != parent_id) {
channel1 = null;
if (channel.isForumPost()) {
let parent_id1;
if (null != channel) {
parent_id1 = channel.parent_id;
}
2026-07-23 10:11:24 +00:00
channel1 = outer1_2.getChannel(parent_id1);
2026-07-20 16:05:17 +00:00
}
}
return channel1;
});
if (null != stateFromStores) {
hasFlagResult = stateFromStores.hasFlag(ChannelFlags.HIDE_MEDIA_DOWNLOAD_OPTIONS);
}
return true === hasFlagResult;
};