decord/source/modules/media_keyboard/native/useUploadDisabled.tsx

37 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11448
// Function ID: 11449
2026-07-20 16:05:17 +00:00
// Name: useUploadDisabled
2026-08-24 06:08:38 +00:00
// Dependencies: [4830, 4024, 4829, 676, 589, 5394, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 11448 (useUploadDisabled)
import set from "set" /* 2 */;
import handleChanged from "handleChanged" /* 4830 */;
import closure_3 from "getUncachedChannelPermissions" /* 4024 */;
import closure_4 from "map" /* 4829 */;
import ME from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const DraftType = handleChanged.DraftType;
2026-07-29 08:29:29 +00:00
({ MAX_UPLOAD_COUNT: c5, Permissions: closure_6 } = ME);
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/media_keyboard/native/useUploadDisabled.tsx");
2026-07-20 16:05:17 +00:00
export default function useUploadDisabled(arg0) {
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-08-24 06:08:38 +00:00
const items = [closure_3, closure_4];
2026-07-29 08:29:29 +00:00
return _require(589).useStateFromStores(items, () => {
2026-08-24 06:08:38 +00:00
let tmp = closure_1_4.getUploads(lib.id, closure_1_2.ChannelMessage).length >= closure_1_5;
2026-07-20 16:05:17 +00:00
if (!tmp) {
2026-08-24 06:08:38 +00:00
let tmp4 = obj.id === lib(closure_1_1[5]).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
2026-07-29 08:29:29 +00:00
if (!tmp4) {
let isPrivateResult = obj.isPrivate();
2026-07-20 16:05:17 +00:00
if (!isPrivateResult) {
2026-08-24 06:08:38 +00:00
isPrivateResult = closure_1_3.can(closure_1_6.ATTACH_FILES, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp4 = !isPrivateResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp = tmp4;
2026-07-20 16:05:17 +00:00
}
return tmp;
});
};