Render room list with new generic list

This commit is contained in:
Joscha 2022-07-05 19:37:03 +02:00
parent 8b7c58b702
commit 7f1dc020d3
3 changed files with 152 additions and 126 deletions

View file

@ -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() {