Clears @mentions when clearing draft
This commit is contained in:
parent
add184d0da
commit
476006af96
2 changed files with 9 additions and 4 deletions
|
@ -4160,9 +4160,10 @@ export class ConversationModel extends window.Backbone
|
||||||
? {}
|
? {}
|
||||||
: {
|
: {
|
||||||
draft: '',
|
draft: '',
|
||||||
|
draftBodyRanges: [],
|
||||||
draftTimestamp: null,
|
draftTimestamp: null,
|
||||||
lastMessage: model.getNotificationText(),
|
|
||||||
lastMessageAuthor: model.getAuthorText(),
|
lastMessageAuthor: model.getAuthorText(),
|
||||||
|
lastMessage: model.getNotificationText(),
|
||||||
lastMessageStatus: 'sending' as const,
|
lastMessageStatus: 'sending' as const,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@ import { useBoundActions } from '../../hooks/useBoundActions';
|
||||||
import { scrollToMessage } from './conversations';
|
import { scrollToMessage } from './conversations';
|
||||||
import type { ScrollToMessageActionType } from './conversations';
|
import type { ScrollToMessageActionType } from './conversations';
|
||||||
import { longRunningTaskWrapper } from '../../util/longRunningTaskWrapper';
|
import { longRunningTaskWrapper } from '../../util/longRunningTaskWrapper';
|
||||||
|
import { drop } from '../../util/drop';
|
||||||
|
|
||||||
// State
|
// State
|
||||||
|
|
||||||
|
@ -384,12 +385,15 @@ function sendMultiMediaMessage(
|
||||||
{
|
{
|
||||||
sendHQImages,
|
sendHQImages,
|
||||||
timestamp,
|
timestamp,
|
||||||
|
// We rely on enqueueMessageForSend to call these within redux's batch
|
||||||
extraReduxActions: () => {
|
extraReduxActions: () => {
|
||||||
conversation.setMarkedUnread(false);
|
conversation.setMarkedUnread(false);
|
||||||
resetLinkPreview();
|
resetLinkPreview();
|
||||||
void clearConversationDraftAttachments(
|
drop(
|
||||||
conversationId,
|
clearConversationDraftAttachments(
|
||||||
draftAttachments
|
conversationId,
|
||||||
|
draftAttachments
|
||||||
|
)
|
||||||
);
|
);
|
||||||
setQuoteByMessageId(conversationId, undefined)(
|
setQuoteByMessageId(conversationId, undefined)(
|
||||||
dispatch,
|
dispatch,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue