Fixed chat input not clearing after sending.
This commit is contained in:
@@ -993,13 +993,25 @@ public sealed class ZoneChatUi : WindowMediatorSubscriberBase
|
|||||||
{
|
{
|
||||||
_refocusChatInput = true;
|
_refocusChatInput = true;
|
||||||
_refocusChatInputKey = channel.Key;
|
_refocusChatInputKey = channel.Key;
|
||||||
var sanitized = SanitizeOutgoingDraft(draft);
|
|
||||||
|
var draftAtSend = draft;
|
||||||
|
var sanitized = SanitizeOutgoingDraft(draftAtSend);
|
||||||
|
|
||||||
if (sanitized is not null)
|
if (sanitized is not null)
|
||||||
{
|
{
|
||||||
TrackPendingDraftClear(channel.Key, sanitized);
|
TrackPendingDraftClear(channel.Key, sanitized);
|
||||||
|
|
||||||
if (TrySendDraft(channel, sanitized))
|
if (TrySendDraft(channel, sanitized))
|
||||||
{
|
{
|
||||||
_scrollToBottom = true;
|
_scrollToBottom = true;
|
||||||
|
|
||||||
|
if (_draftMessages.TryGetValue(channel.Key, out var current) &&
|
||||||
|
string.Equals(current, draftAtSend, StringComparison.Ordinal))
|
||||||
|
{
|
||||||
|
draft = string.Empty;
|
||||||
|
_draftMessages[channel.Key] = draft;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user