Files
discord-decomp/sources/modules/media_keyboard/native/useUploadDisabled.tsx
T
2026-07-28 01:06:53 +03:00

39 lines
2.8 KiB
TypeScript

/* Metro module 15148; source: modules/media_keyboard/native/useUploadDisabled.tsx; dependencies: [4645, 3784, 4644, 661, 566, 5225, 2] */
import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
import UploadAttachmentStore from '../../../stores/UploadAttachmentStore.tsx'; /* Metro dependency 4644 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as DraftStoreModule from '../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
function _fun115520(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115520, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15345:6, offset: 0x024637d3, size: 184 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/media_keyboard/native/useUploadDisabled.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[4]).useStateFromStores([PermissionStore, UploadAttachmentStore], _fun115522);
};
function useUploadDisabled(a0) { // fn#115521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15345:278, offset: 0x0246388b, size: 74 bytes, params: 2, frame: 15
const env0_0 = a0;
return (FluxModule).useStateFromStores([PermissionStore, UploadAttachmentStore],
_fun115522);
function _fun115522() { // fn#115522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15345:349, offset: 0x024638d5, size: 156 bytes, params: 1, frame: 16
const value = environment.__proto__;
const uploadAttachmentStoreBinding = UploadAttachmentStore;
const getUploads = uploadAttachmentStoreBinding.getUploads;
const id = env0_0.id;
const ChannelMessage = DraftType.ChannelMessage;
return Reflect.apply(getUploads, uploadAttachmentStoreBinding, [id,
ChannelMessage]).length >= MAX_UPLOAD_COUNT || (env0_0.id === (require(5225) /* metro dependency 5225: FakePlaceholderPrivateChannel */).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID || !(env0_0.isPrivate() || PermissionStore.can(Permissions.ATTACH_FILES,
env0_0)));
}
}
}
global.__d(_fun115520, 15148, [4645, 3784, 4644, 661, 566, 5225,
2]) /* metro module 15148, dependencies: [4645, 3784, 4644, 661, 566, 5225, 2] */;