优化消息排序逻辑,调整置顶和时间戳的处理方式,以确保置顶消息优先显示,提升消息列表的可读性和用户体验。
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user