2026-08-25 06:04:03 +00:00
|
|
|
// Module ID: 11082
|
|
|
|
|
// Function ID: 11083
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: computeGlobalSpoilerDisplay
|
2026-08-25 06:04:03 +00:00
|
|
|
// Dependencies: [4025, 676, 647, 4070, 2]
|
2026-07-29 08:29:29 +00:00
|
|
|
// Exports: default, useShouldDisplaySpoilerObscurity
|
2026-07-20 16:05:17 +00:00
|
|
|
|
2026-08-25 06:04:03 +00:00
|
|
|
// Module 11082 (computeGlobalSpoilerDisplay)
|
|
|
|
|
import closure_2 from "getUncachedChannelPermissions" /* 4025 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
import ME from "ME" /* 676 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
|
|
|
|
const require = arg1;
|
2026-07-29 08:29:29 +00:00
|
|
|
({ Permissions: c3, SpoilerRenderSetting: c4 } = ME);
|
2026-08-24 06:08:38 +00:00
|
|
|
const result = require("set").fileFinishedImporting("modules/messages/computeGlobalSpoilerDisplay.tsx");
|
2026-07-29 08:29:29 +00:00
|
|
|
|
|
|
|
|
export default function computeGlobalSpoilerDisplay(arg0, arg1) {
|
|
|
|
|
if (constants.ALWAYS === arg0) {
|
2026-07-20 16:05:17 +00:00
|
|
|
return true;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else if (tmp.IF_MODERATOR === arg0) {
|
|
|
|
|
return arg1;
|
2026-07-20 16:05:17 +00:00
|
|
|
} else {
|
2026-07-29 08:29:29 +00:00
|
|
|
const ON_CLICK = tmp.ON_CLICK;
|
2026-07-20 16:05:17 +00:00
|
|
|
return false;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
};
|
2026-07-20 16:05:17 +00:00
|
|
|
export const useShouldDisplaySpoilerObscurity = function useShouldDisplaySpoilerObscurity(channel) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const _require = channel;
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_2];
|
|
|
|
|
const stateFromStores = _require(647).useStateFromStores(items, () => closure_1_2.can(closure_1_3.MANAGE_MESSAGES, closure_0));
|
2026-08-25 06:04:03 +00:00
|
|
|
const RenderSpoilers = _require(4070).RenderSpoilers;
|
2026-07-29 08:29:29 +00:00
|
|
|
const setting = RenderSpoilers.useSetting();
|
|
|
|
|
let flag = true;
|
|
|
|
|
if (constants.ALWAYS !== setting) {
|
|
|
|
|
flag = stateFromStores;
|
|
|
|
|
if (tmp3.IF_MODERATOR !== setting) {
|
|
|
|
|
const ON_CLICK = tmp3.ON_CLICK;
|
|
|
|
|
flag = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return !flag;
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|