♻️ Add Account, Room and Space UI store structs

This commit is contained in:
2024-05-11 15:24:49 +02:00
parent bc6b02bc34
commit 18a797bc3f
12 changed files with 152 additions and 183 deletions

View File

@@ -1,15 +1,13 @@
use std::rc::Rc;
use super::room::Room;
use super::space::Space;
use crate::base::{StoreRoom, StoreSpace};
use super::{room::Room, space::Space};
#[allow(dead_code)]
pub trait AccountStoreConsumerInterface {}
pub trait AccountStoreProviderInterface {
fn on_new_room(&self, room: Rc<Room>) -> StoreRoom;
fn on_new_space(&self, space: Rc<Space>) -> StoreSpace;
fn on_new_room(&self, room: Rc<Room>) -> Rc<dyn RoomStoreProviderInterface>;
fn on_new_space(&self, space: Rc<Space>) -> Rc<dyn SpaceStoreProviderInterface>;
}
#[allow(dead_code)]
@@ -19,5 +17,5 @@ pub trait RoomStoreProviderInterface {}
#[allow(dead_code)]
pub trait SpaceStoreConsumerInterface {}
pub trait SpaceStoreProviderInterface {
fn set_name(&mut self, _name: Option<String>) {}
fn set_name(&self, _name: Option<String>) {}
}