chore: polish UI

This commit is contained in:
Tristan Yang
2023-02-23 22:20:15 +08:00
parent d10df4bee5
commit 8a5259a9fd
11 changed files with 24 additions and 21 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ const SessionList: FC<Props> = ({ tempSession }) => {
if (!mids || mids.length == 0) {
return { key: `channel_${id}`, unreads: 0, id, type: "channel" };
}
const mid = [...mids].pop();
const mid = [...mids].sort().pop();
return { key: `channel_${id}`, id, mid, type: "channel" };
});
const uSessions = DMs.map((id) => {
@@ -45,7 +45,7 @@ const SessionList: FC<Props> = ({ tempSession }) => {
if (!mids || mids.length == 0) {
return { key: `user_${id}`, unreads: 0, id, type: "user" };
}
const mid = [...mids].pop();
const mid = [...mids].sort().pop();
return { key: `user_${id}`, type: "user", id, mid };
});
const tmps = [...(cSessions as ChatSession[]), ...(uSessions as ChatSession[])].sort((a, b) => {