decord/source/actions/native/UploadActionCreators.tsx

41 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 10951
// Function ID: 10952
// Dependencies: [4830, 7620, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 10951
import dispatcherDefault from "dispatcher" /* 709 */;
import closure_2 from "handleChanged" /* 4830 */;
import { DraftType } from "handleChanged" /* 4830 */;
import closure_4 from "initialize" /* 7620 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("actions/native/UploadActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export default {
restoreFailedUpload(messageId, file) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-20 16:05:17 +00:00
obj = { type: "UPLOAD_RESTORE_FAILED_UPLOAD", messageId, file };
obj.dispatch(obj);
},
cancel(channelId, file) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-20 16:05:17 +00:00
obj = { type: "UPLOAD_CANCEL_REQUEST", channelId, file };
obj.dispatch(obj);
2026-07-23 10:11:24 +00:00
messageForFile = messageForFile.getMessageForFile(file.id);
2026-07-20 16:05:17 +00:00
if (null != messageForFile) {
if ("" === draft.getDraft(messageForFile.channel_id, DraftType.ChannelMessage)) {
2026-07-29 08:29:29 +00:00
obj = { type: "DRAFT_SAVE", channelId: null, draft: null, draftType: null };
({ channel_id: obj4[1], content: obj4[2] } = messageForFile);
obj[3] = tmp6.ChannelMessage;
2026-08-24 06:08:38 +00:00
dispatcherDefault.dispatch(obj);
const tmpResult = dispatcherDefault;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp6 = DraftType;
2026-07-20 16:05:17 +00:00
}
},
cancelUploadItem(found, itemId) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-20 16:05:17 +00:00
obj = { type: "UPLOAD_ITEM_CANCEL_REQUEST", file: found, itemId };
obj.dispatch(obj);
}
};