Files
discord-decomp/modules/media_channel/useShouldHideMediaOptions.tsx
T
2026-11-01 12:12:55 +02:00

12 lines
658 B
TypeScript

// Metro module 9558 (f9559).
import ChannelStore from "../../stores/ChannelStore";
import { ChannelFlags } from "../channel/ChannelConstants";
import { useStateFromStores } from "../../_bundle/defaultAreStatesEqual";
export default function useShouldHideMediaOptions(c17289_0) {
const stateFromStores = useStateFromStores([ChannelStore], () => {
const channel = ChannelStore.getChannel(c17289_0);
return channel?.parent_id != null ? channel.isForumPost() ? ChannelStore.getChannel(channel?.parent_id) : null : null;
});
return (stateFromStores == null ? void 0 : stateFromStores.hasFlag(ChannelFlags.HIDE_MEDIA_DOWNLOAD_OPTIONS)) === true;
};