Load receipts for room before acquiring lock (#213)

This commit is contained in:
Ulyssa 2024-03-06 23:49:35 -08:00 committed by GitHub
parent dd001af365
commit ec81b72f2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 68 additions and 31 deletions

View file

@ -1119,6 +1119,10 @@ impl RoomNeeds {
pub fn insert(&mut self, room_id: OwnedRoomId, need: Need) {
self.needs.entry(room_id).or_default().insert(need);
}
pub fn rooms(&self) -> usize {
self.needs.len()
}
}
impl IntoIterator for RoomNeeds {