We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e82a01e commit 4d41a68Copy full SHA for 4d41a68
samples/BlazorChat/Pages/ChatRoom.razor
@@ -81,6 +81,10 @@ else
81
82
try
83
{
84
+ // Start chatting and force refresh UI, ref: https://github.com/dotnet/aspnetcore/issues/22159
85
+ _isChatting = true;
86
+ await Task.Delay(1);
87
+
88
// remove old messages if any
89
_messages.Clear();
90
@@ -97,13 +101,12 @@ else
97
101
98
102
await _hubConnection.StartAsync();
99
103
100
- _isChatting = true;
-
104
await SendAsync($"[Notice] {_username} joined chat room.");
105
}
106
catch (Exception e)
107
108
_message = $"ERROR: Failed to start chat client: {e.Message}";
109
+ _isChatting = false;
110
111
112
0 commit comments