mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-21 00:48:19 +01:00
Ensure multiple draft attachment adds don't stomp on each other
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
} from './processAttachment';
|
||||
import type { AttachmentType } from '../types/Attachment';
|
||||
import { AttachmentToastType } from '../types/AttachmentToastType';
|
||||
import * as log from '../logging/log';
|
||||
|
||||
export type AddAttachmentActionType = (
|
||||
conversationId: string,
|
||||
@@ -74,6 +75,10 @@ export async function handleAttachmentsProcessing({
|
||||
}
|
||||
addAttachment(conversationId, attachment);
|
||||
} catch (err) {
|
||||
log.error(
|
||||
'handleAttachmentsProcessing: failed to process attachment:',
|
||||
err.stack
|
||||
);
|
||||
removeAttachment(conversationId, file.path);
|
||||
onShowToast(AttachmentToastType.ToastUnableToLoadAttachment);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user