decord/alpha/source/actions/native/UploadActionCreators.tsx

45 lines
1.5 KiB
TypeScript
Raw Permalink Normal View History

2026-10-10 08:08:14 +00:00
// Module ID: 10783
// Function ID: 10784
// Name: UploadActionCreators
2026-10-12 06:59:38 +00:00
// Dependencies: [7244, 7887, 584, 2]
2026-07-20 16:05:17 +00:00
2026-10-10 08:08:14 +00:00
// Module 10783 (UploadActionCreators)
2026-10-03 08:58:59 +00:00
import DispatcherDefault from "Dispatcher" /* 584 */;
2026-10-12 06:59:38 +00:00
import DraftStore2 from "DraftStore" /* 7244 */;
import UploadStore from "UploadStore" /* 7887 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
const DraftStore = DraftStore2;
2026-07-20 16:05:17 +00:00
2026-10-03 08:58:59 +00:00
const DraftType = DraftStore2.DraftType;
let obj = {
2026-07-20 16:05:17 +00:00
restoreFailedUpload(messageId, file) {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "UPLOAD_RESTORE_FAILED_UPLOAD", messageId, file };
obj.dispatch(obj2);
2026-07-20 16:05:17 +00:00
},
cancel(channelId, file) {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "UPLOAD_CANCEL_REQUEST", channelId, file };
obj.dispatch(obj2);
const messageForFile = UploadStore.getMessageForFile(file.id);
2026-07-20 16:05:17 +00:00
if (null != messageForFile) {
2026-10-03 08:58:59 +00:00
const tmp6 = DraftType;
if ("" === DraftStore.getDraft(messageForFile.channel_id, DraftType.ChannelMessage)) {
2026-10-03 08:58:59 +00:00
const obj3 = { type: "DRAFT_SAVE", channelId: null, draft: null, draftType: tmp6.ChannelMessage };
({ channel_id: obj4.channelId, content: obj4.draft } = messageForFile);
const tmpResult = DispatcherDefault;
2026-10-03 08:58:59 +00:00
tmpResult.dispatch(obj3);
2026-07-20 16:05:17 +00:00
}
}
},
cancelUploadItem(found, itemId) {
2026-10-03 08:58:59 +00:00
const obj = DispatcherDefault;
const obj2 = { type: "UPLOAD_ITEM_CANCEL_REQUEST", file: found, itemId };
obj.dispatch(obj2);
2026-07-20 16:05:17 +00:00
}
};
2026-10-03 08:58:59 +00:00
const result = size.fileFinishedImporting("actions/native/UploadActionCreators.tsx");
export default obj;