...
This commit is contained in:
@@ -304,7 +304,7 @@
|
||||
Inbox3Items = await chatService.MyChatsIsFinished();
|
||||
|
||||
//-------------hub
|
||||
var token = await localStorageService.GetItem<string>("U/key");
|
||||
var token = await localStorageService.GetItem<string>("C/key");
|
||||
string AddressHub = _Http.BaseAddress.AbsoluteUri.Replace("api/", "");
|
||||
|
||||
hubConnection = new HubConnectionBuilder()
|
||||
@@ -317,7 +317,7 @@
|
||||
|
||||
hubConnection.On<ChatItemResponseDto>("ReceiveNewChatItemFromUser", async (chatitem) =>
|
||||
{
|
||||
if (ChatCurrent.ID == chatitem.ChatItemID)
|
||||
if (ChatCurrent!=null && ChatCurrent.ID == chatitem.ChatItemID)
|
||||
{
|
||||
ChatCurrent.Responses.Add(chatitem);
|
||||
StateHasChanged();
|
||||
@@ -325,6 +325,11 @@
|
||||
// Scroll to target if exists, otherwise scroll to bottom
|
||||
await JS.InvokeVoidAsync("scrollToTargetOrBottom");
|
||||
}
|
||||
else if (Inbox2Items.Any(a => a.ID == chatitem.ChatItemID))
|
||||
{
|
||||
Inbox2Items = await chatService.MyChatsIsInProgress();
|
||||
StateHasChanged();
|
||||
}
|
||||
});
|
||||
|
||||
hubConnection.On<int>("CheckMarkAsRead", async (chatresponseid) =>
|
||||
|
Reference in New Issue
Block a user