Render room list with new generic list
This commit is contained in:
parent
8b7c58b702
commit
7f1dc020d3
3 changed files with 152 additions and 126 deletions
|
|
@ -40,14 +40,18 @@ impl EuphRoom {
|
|||
self.room = None;
|
||||
}
|
||||
|
||||
pub fn connected(&self) -> bool {
|
||||
pub async fn status(&self) -> Option<Option<Status>> {
|
||||
if let Some(room) = &self.room {
|
||||
!room.stopped()
|
||||
room.status().await.ok()
|
||||
} else {
|
||||
false
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn stopped(&self) -> bool {
|
||||
self.room.as_ref().map(|r| r.stopped()).unwrap_or(true)
|
||||
}
|
||||
|
||||
pub fn retain(&mut self) {
|
||||
if let Some(room) = &self.room {
|
||||
if room.stopped() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue