From c90e4550c445033ce1bf7d72c71ac4ec7107504b Mon Sep 17 00:00:00 2001 From: mmrbnjd Date: Fri, 8 Aug 2025 23:45:39 +0330 Subject: [PATCH] ... --- Presentation/HushianWebApp/Pages/Chat.razor | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Presentation/HushianWebApp/Pages/Chat.razor b/Presentation/HushianWebApp/Pages/Chat.razor index 7f9555d..983dfee 100644 --- a/Presentation/HushianWebApp/Pages/Chat.razor +++ b/Presentation/HushianWebApp/Pages/Chat.razor @@ -304,7 +304,7 @@ Inbox3Items = await chatService.MyChatsIsFinished(); //-------------hub - var token = await localStorageService.GetItem("U/key"); + var token = await localStorageService.GetItem("C/key"); string AddressHub = _Http.BaseAddress.AbsoluteUri.Replace("api/", ""); hubConnection = new HubConnectionBuilder() @@ -317,7 +317,7 @@ hubConnection.On("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("CheckMarkAsRead", async (chatresponseid) =>