♻️ Use of Store interfaces

This commit is contained in:
2024-05-15 19:07:46 +02:00
parent bc30670f6e
commit d77c2a9d12
7 changed files with 178 additions and 43 deletions

View File

@@ -8,7 +8,7 @@ use super::{
common::Avatar,
messaging_interface::{SpaceMessagingConsumerInterface, SpaceMessagingProviderInterface},
room::RoomId,
store_interface::SpaceStoreProviderInterface,
store_interface::{SpaceStoreConsumerInterface, SpaceStoreProviderInterface},
};
pub type SpaceId = OwnedRoomId;
@@ -89,3 +89,13 @@ impl SpaceMessagingConsumerInterface for Space {
}
}
}
impl SpaceStoreConsumerInterface for Space {
fn id(&self) -> &SpaceId {
&self.id
}
fn name(&self) -> Option<String> {
self.name.borrow().clone()
}
}