Sort user list by online status and handle.

This commit is contained in:
yukirij 2024-10-01 12:04:40 -07:00
parent f096fd6f79
commit f1360de3c4

View File

@ -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))) Some(QRPacket::new(qr.id, QRPacketData::RUserList(response)))
} }