decord/source/modules/media_keyboard/native/useUploadDisabled.tsx
github-actions 4f02868c60 chore: update source for alpha 346.4
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4792.js (118.4 MB)
2026-09-11 10:30:06 +00:00

39 lines
1.4 KiB
TypeScript

// Module ID: 12331
// Function ID: 12332
// Name: useUploadDisabled
// Dependencies: [4948, 4245, 4947, 1074, 504, 7295, 2]
// Exports: default
// Module 12331 (useUploadDisabled)
import DraftStore from "DraftStore" /* 4948 */;
import FakePlaceholderPrivateChannel from "FakePlaceholderPrivateChannel" /* 7295 */;
import PermissionStore from "PermissionStore" /* 4245 */;
import UploadAttachmentStore from "UploadAttachmentStore" /* 4947 */;
import Constants from "Constants" /* 1074 */;
import size from "module_2" /* 2 */;
const require = globalThis.__r;
const DraftType = DraftStore.DraftType;
({ MAX_UPLOAD_COUNT: hasOwnProperty, Permissions: metroRequire } = Constants);
const result = size.fileFinishedImporting("modules/media_keyboard/native/useUploadDisabled.tsx");
export default function useUploadDisabled(arg0) {
_require = arg0;
const items = [PermissionStore, UploadAttachmentStore];
return require("initialize").useStateFromStores(items, () => {
let tmp = UploadAttachmentStore.getUploads(id.id, DraftType.ChannelMessage).length >= hasOwnProperty;
if (!tmp) {
let tmp4 = obj.id === FakePlaceholderPrivateChannel.FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID;
if (!tmp4) {
let isPrivateResult = obj.isPrivate();
if (!isPrivateResult) {
isPrivateResult = PermissionStore.can(constants.ATTACH_FILES, obj);
}
tmp4 = !isPrivateResult;
}
tmp = tmp4;
}
return tmp;
});
};