Show amount of rooms in room list

This commit is contained in:
Joscha 2022-07-06 11:33:57 +02:00
parent e1585bfe30
commit 39560f1fc5

View file

@ -117,12 +117,11 @@ impl Rooms {
} }
async fn render_rows(&self, rooms: Vec<String>) -> Vec<Row<String>> { async fn render_rows(&self, rooms: Vec<String>) -> Vec<Row<String>> {
let mut rows: Vec<Row<String>> = let mut rows: Vec<Row<String>> = vec![];
vec![Row::unsel(("Rooms", ContentStyle::default().bold()))];
if rooms.is_empty() { let heading_style = ContentStyle::default().bold();
rows.push(Row::unsel(("none", ContentStyle::default().dark_grey()))) let heading = Styled::new(("Rooms", heading_style)).then(format!(" ({})", rooms.len()));
} rows.push(Row::unsel(heading));
for room in rooms { for room in rooms {
let bg_style = ContentStyle::default(); let bg_style = ContentStyle::default();