chat patch

This commit is contained in:
unknown 2025-10-04 23:11:06 +03:00
parent fc793f2e57
commit 7453828a5f
2 changed files with 2 additions and 1 deletions

View File

@ -35,6 +35,7 @@ class PrivateChatListItem(BaseModel):
chat_data: Optional[Dict[str, Any]] = Field(default=None, description="Данные о чате")
last_message: Optional[MessageItem] = Field(None, description="Последнее сообщение в чате")
created_at: datetime = Field(..., description="Дата создания чата")
unread_count: int = Field(..., description="Кол-во непрочитанных сообщений")
class PrivateChatListData(BaseModel):

View File

@ -167,7 +167,7 @@ class ChatListView(QWidget):
timestamp = ""
# TODO: Заменить на реальное количество непрочитанных сообщений
unread_count = 2
unread_count = chat.unread_count
# Build display timestamp based on recency
if chat.last_message and getattr(chat.last_message, 'created_at', None):