聊天:时间
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user