Sort user list by online status and handle.
This commit is contained in:
parent
f096fd6f79
commit
f1360de3c4
@ -783,6 +783,11 @@ pub async fn thread_system(mut app:App, bus:Bus<protocol::QRPacket>)
|
||||
}
|
||||
}
|
||||
|
||||
response.records.sort_by(|a, b| {
|
||||
b.is_online.cmp(&a.is_online)
|
||||
.then(a.handle.cmp(&b.handle))
|
||||
});
|
||||
|
||||
Some(QRPacket::new(qr.id, QRPacketData::RUserList(response)))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user