mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-18 21:52:30 -04:00
chore(spaces): use Client::joined_space_rooms within the space service to reduce the number of iterations required
This commit is contained in:
committed by
Stefan Ceriu
parent
3c069f0c5c
commit
d43d141dc8
@@ -173,11 +173,7 @@ impl SpaceService {
|
||||
}
|
||||
|
||||
async fn joined_spaces_for(client: &Client) -> Vec<SpaceRoom> {
|
||||
let joined_spaces = client
|
||||
.joined_rooms()
|
||||
.into_iter()
|
||||
.filter_map(|room| room.is_space().then_some(room))
|
||||
.collect::<Vec<_>>();
|
||||
let joined_spaces = client.joined_space_rooms();
|
||||
|
||||
// Build a graph to hold the parent-child relations
|
||||
let mut graph = SpaceGraph::new();
|
||||
|
||||
Reference in New Issue
Block a user