mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-08-07 05:22:31 -04:00
fix(labs): Fix jack-in.
This commit is contained in:
1 parent
c86ebaddd2
commit
c6d99305d5
3 files changed
+12
-7
No files matched your search
@@ -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| {
|
||||
|
||||
@@ -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()))
|
||||
|
||||
Reference in new issue
Block a user