fix(labs): Fix jack-in.

This commit is contained in:
Ivan Enderlin committed 2023-02-09 15:46:08 +01:00
1 parent c86ebaddd2
commit c6d99305d5
3 files changed
+12 -7

No files matched your search

+2 -2
View File
@@ -51,10 +51,10 @@ impl Details {
return;
};
let name = room_data.name.clone().unwrap_or_else(|| "unknown".to_owned());
let name = room_data.name().unwrap_or_else(|| "unknown").to_owned();
let state_events = room_data
.required_state
.required_state()
.iter()
.filter_map(|r| r.deserialize().ok())
.fold(BTreeMap::<String, Vec<_>>::new(), |mut b, r| {
+2 -3
View File
@@ -64,9 +64,8 @@ impl MockComponent for Rooms {
let mut paras = vec![];
for r in self.sstate.get_all_rooms() {
let mut cells =
vec![Cell::from(r.name.clone().unwrap_or_else(|| "unknown".to_owned()))];
if let Some(c) = r.unread_notifications.notification_count {
let mut cells = vec![Cell::from(r.name().unwrap_or_else(|| "unknown").to_owned())];
if let Some(c) = r.unread_notifications().notification_count {
let count: u32 = c.try_into().unwrap_or_default();
if count > 0 {
cells.push(Cell::from(c.to_string()))