✨ Add topic to the UI store Room
This commit is contained in:
@@ -123,11 +123,6 @@ impl Room {
|
||||
self.name.borrow().clone()
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn topic(&self) -> &Option<String> {
|
||||
&self.topic
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn set_topic(&mut self, topic: Option<String>) {
|
||||
self.topic = topic;
|
||||
@@ -308,6 +303,10 @@ impl RoomStoreConsumerInterface for Room {
|
||||
self.name.borrow().clone()
|
||||
}
|
||||
|
||||
fn topic(&self) -> Option<String> {
|
||||
self.topic.clone()
|
||||
}
|
||||
|
||||
async fn avatar(&self) -> Option<Avatar> {
|
||||
self.get_avatar().await
|
||||
}
|
||||
|
@@ -28,6 +28,7 @@ pub trait RoomStoreConsumerInterface {
|
||||
fn id(&self) -> &RoomId;
|
||||
fn is_direct(&self) -> Option<bool>;
|
||||
fn name(&self) -> Option<String>;
|
||||
fn topic(&self) -> Option<String>;
|
||||
|
||||
#[allow(dead_code)]
|
||||
async fn avatar(&self) -> Option<Avatar>;
|
||||
@@ -38,6 +39,7 @@ pub trait RoomStoreConsumerInterface {
|
||||
pub trait RoomStoreProviderInterface {
|
||||
fn on_new_name(&self, name: Option<String>);
|
||||
fn on_new_avatar(&self, avatar: Option<Avatar>);
|
||||
fn on_new_topic(&self, topic: Option<String>);
|
||||
fn on_new_member(&self, member: RoomMember);
|
||||
fn on_invitation(&self, invitation: Invitation);
|
||||
}
|
||||
|
Reference in New Issue
Block a user