Box widgets

This way, widgets containing other widgets can be heterogenous. Wenever
a widget is expeted, *any* widget will work.
This commit is contained in:
Joscha 2022-07-12 21:09:38 +02:00
parent dea0384162
commit 8eda1ad97d
5 changed files with 5 additions and 5 deletions

View file

@ -146,7 +146,7 @@ impl Rooms {
let rooms = self.stabilize_rooms().await;
let mut list = self.list.list().focus(true);
self.render_rows(&mut list, rooms).await;
list.render(frame, Pos::ZERO, frame.size()).await;
Box::new(list).render(frame, Pos::ZERO, frame.size()).await;
}
pub async fn handle_key_event(