Compare commits
4 Commits
2.0.1.69-D
...
2.0.1.70-D
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de2b537fb1 | ||
|
|
838f4d1b1b | ||
| 474fd5ef11 | |||
|
|
759066731e |
@@ -3,7 +3,7 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors></Authors>
|
<Authors></Authors>
|
||||||
<Company></Company>
|
<Company></Company>
|
||||||
<Version>2.0.1.69</Version>
|
<Version>2.0.1.70</Version>
|
||||||
<Description></Description>
|
<Description></Description>
|
||||||
<Copyright></Copyright>
|
<Copyright></Copyright>
|
||||||
<PackageProjectUrl>https://github.com/Light-Public-Syncshells/LightlessClient</PackageProjectUrl>
|
<PackageProjectUrl>https://github.com/Light-Public-Syncshells/LightlessClient</PackageProjectUrl>
|
||||||
|
|||||||
@@ -1000,23 +1000,26 @@ public sealed class ZoneChatUi : WindowMediatorSubscriberBase
|
|||||||
if (sanitized is not null)
|
if (sanitized is not null)
|
||||||
{
|
{
|
||||||
TrackPendingDraftClear(channel.Key, sanitized);
|
TrackPendingDraftClear(channel.Key, sanitized);
|
||||||
|
draft = string.Empty;
|
||||||
|
_draftMessages[channel.Key] = draft;
|
||||||
|
_scrollToBottom = true;
|
||||||
|
|
||||||
if (TrySendDraft(channel, sanitized))
|
_ = Task.Run(async () =>
|
||||||
{
|
{
|
||||||
_scrollToBottom = true;
|
try
|
||||||
|
|
||||||
if (_draftMessages.TryGetValue(channel.Key, out var current) &&
|
|
||||||
string.Equals(current, draftAtSend, StringComparison.Ordinal))
|
|
||||||
{
|
{
|
||||||
draft = string.Empty;
|
var succeeded = await _zoneChatService.SendMessageAsync(channel.Descriptor, sanitized).ConfigureAwait(false);
|
||||||
_draftMessages[channel.Key] = draft;
|
if (!succeeded)
|
||||||
|
{
|
||||||
|
RemovePendingDraftClear(channel.Key, sanitized);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
}
|
{
|
||||||
else
|
_logger.LogWarning(ex, "Failed to send chat message");
|
||||||
{
|
RemovePendingDraftClear(channel.Key, sanitized);
|
||||||
RemovePendingDraftClear(channel.Key, sanitized);
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user