mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Fix: order createdAt_desc & lastMessageAt_desc
This commit is contained in:
parent
21124bcd71
commit
074711dd90
@ -257,7 +257,7 @@ export default {
|
||||
const rmsIds = []
|
||||
;[...Room, ...this.rooms].forEach((r) => {
|
||||
if (!rmsIds.find((v) => v === r.id)) {
|
||||
rms.unshift(this.fixRoomObject(r))
|
||||
rms.push(this.fixRoomObject(r))
|
||||
rmsIds.push(r.id)
|
||||
}
|
||||
})
|
||||
|
||||
@ -24,7 +24,7 @@ export const createRoom = () => gql`
|
||||
|
||||
export const roomQuery = () => gql`
|
||||
query Room($first: Int, $offset: Int, $id: ID) {
|
||||
Room(first: $first, offset: $offset, id: $id, orderBy: [lastMessageAt_desc, createdAt_desc]) {
|
||||
Room(first: $first, offset: $offset, id: $id, orderBy: [createdAt_desc, lastMessageAt_desc]) {
|
||||
id
|
||||
roomId
|
||||
roomName
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user