This commit is contained in:
mmrbnjd
2025-07-27 22:55:26 +03:30
parent 104e38c3b1
commit 43b6e4e746
3 changed files with 54 additions and 23 deletions

View File

@@ -1,5 +1,7 @@
@using Common.Dtos.Conversation
@using HushianWebApp.Service
@inject IJSRuntime JSRuntime
@inject ConversationService conversationService;
<div class="chat-container p-3">
@@ -12,8 +14,8 @@
@if (!msg.IsRead && msg.Type == Common.Enums.ConversationType.UE)
{
<p>ـــــــــــــــــــــــــ</p>
}
}
</div>
}
@@ -46,29 +48,29 @@
<style>
.chat-bubble {
padding: 0.5rem 0.75rem;
border-radius: 1rem;
max-width: 75%;
word-wrap: break-word;
white-space: pre-wrap;
padding: 0.5rem 0.75rem;
border-radius: 1rem;
max-width: 75%;
word-wrap: break-word;
white-space: pre-wrap;
}
.chat-mine {
background: linear-gradient(to right, #005eff, #267fff);
color: white;
border-top-left-radius: 0;
background: linear-gradient(to right, #005eff, #267fff);
color: white;
border-top-left-radius: 0;
}
.chat-other {
background-color: #f1f1f1;
color: #333;
border-top-right-radius: 0;
background-color: #f1f1f1;
color: #333;
border-top-right-radius: 0;
}
.chat-ai {
background-color: #f1f1f1;
color: #353;
border-top-right-radius: 0;
background-color: #f1f1f1;
color: #353;
border-top-right-radius: 0;
}
</style>
@@ -91,10 +93,12 @@
public async Task MarkAsRead(int id)
{
var msg = Messages.FirstOrDefault(m => m.ID == id);
if (msg != null && !msg.IsRead && msg.Type==Common.Enums.ConversationType.UE)
if (msg != null && !msg.IsRead && msg.Type == Common.Enums.ConversationType.UE)
{
msg.IsRead = true;
await EventCallIsRead.InvokeAsync(id);
await conversationService.MarkAsReadConversationItemAsync(id);
// await EventCallIsRead.InvokeAsync(id);
}
await Task.CompletedTask;
}