// Metro module 10939 (f10940). import DraftStore, { DraftType } from "../../stores/DraftStore"; import UploadStore from "../../stores/UploadStore"; import Dispatcher from "../../Dispatcher"; const r20 = { restoreFailedUpload: (a0, a1) => { Dispatcher.dispatch({ type: "UPLOAD_RESTORE_FAILED_UPLOAD", messageId: a0, file: a1 }); }, cancel: (a0, a1) => { Dispatcher.dispatch({ type: "UPLOAD_CANCEL_REQUEST", channelId: a0, file: a1 }); const messageForFile = UploadStore.getMessageForFile(a1.id); if (messageForFile != null && DraftStore.getDraft(messageForFile.channel_id, DraftType.ChannelMessage) === "") { Dispatcher.dispatch({ type: "DRAFT_SAVE", channelId: messageForFile.channel_id, draft: messageForFile.content, draftType: DraftType.ChannelMessage }); } }, cancelUploadItem: (a0, a1) => { Dispatcher.dispatch({ type: "UPLOAD_ITEM_CANCEL_REQUEST", file: a0, itemId: a1 }); } }; export default r20;