chat patch
This commit is contained in:
parent
fc793f2e57
commit
7453828a5f
@ -35,6 +35,7 @@ class PrivateChatListItem(BaseModel):
|
|||||||
chat_data: Optional[Dict[str, Any]] = Field(default=None, description="Данные о чате")
|
chat_data: Optional[Dict[str, Any]] = Field(default=None, description="Данные о чате")
|
||||||
last_message: Optional[MessageItem] = Field(None, description="Последнее сообщение в чате")
|
last_message: Optional[MessageItem] = Field(None, description="Последнее сообщение в чате")
|
||||||
created_at: datetime = Field(..., description="Дата создания чата")
|
created_at: datetime = Field(..., description="Дата создания чата")
|
||||||
|
unread_count: int = Field(..., description="Кол-во непрочитанных сообщений")
|
||||||
|
|
||||||
|
|
||||||
class PrivateChatListData(BaseModel):
|
class PrivateChatListData(BaseModel):
|
||||||
|
|||||||
@ -167,7 +167,7 @@ class ChatListView(QWidget):
|
|||||||
timestamp = ""
|
timestamp = ""
|
||||||
|
|
||||||
# TODO: Заменить на реальное количество непрочитанных сообщений
|
# TODO: Заменить на реальное количество непрочитанных сообщений
|
||||||
unread_count = 2
|
unread_count = chat.unread_count
|
||||||
|
|
||||||
# Build display timestamp based on recency
|
# Build display timestamp based on recency
|
||||||
if chat.last_message and getattr(chat.last_message, 'created_at', None):
|
if chat.last_message and getattr(chat.last_message, 'created_at', None):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user