聊天:时间

This commit is contained in:
luying
2021-06-30 20:44:59 +08:00
parent 5c862d0f77
commit 5532d53419

View File

@@ -285,12 +285,12 @@ export async function recentPrivateChatInfos(roleId: string, roleName: string) {
.sort((a, b) => {
if(a.isTop || b.isTop) {
if(a.isTop && b.isTop) {
return a.setTopTime.getTime() - b.setTopTime.getTime()
return b.setTopTime.getTime() - a.setTopTime.getTime()
} else {
return (b.isTop?1:0) - (a.isTop?1:0);
}
} else {
return a.lastChatTime.getTime() - b.lastChatTime.getTime()
return b.lastChatTime.getTime() - a.lastChatTime.getTime()
}
})
.splice(CHAT_SYSTEM.RECENT_PRIVATE_CHATS_CNT);