优化消息排序逻辑,调整置顶和时间戳的处理方式,以确保置顶消息优先显示,提升消息列表的可读性和用户体验。

This commit is contained in:
2025-10-23 17:14:48 +08:00
parent 7f4bc0487e
commit 5c86c2fbf2
2 changed files with 7 additions and 10 deletions

View File

@@ -437,7 +437,7 @@ const MessageList: React.FC<MessageListProps> = () => {
const newSessions = [...prev];
newSessions[existingIndex] = updatedSession;
// 按sortKey降序重新排序最新的在前
// 按sortKey降序重新排序置顶在前,最新的在前)
return newSessions.sort((a, b) => {
const aKey = MessageManager["generateSortKey"](a);
const bKey = MessageManager["generateSortKey"](b);