12 lines
658 B
TypeScript
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;
|
|
};
|