refactor: treat as dyn state to easily add others
Otherwise, all elements are expected to be `Home`.
This commit is contained in:
parent
dbfbad7f5a
commit
65e002dc52
@ -317,7 +317,7 @@ impl App {
|
||||
let current = &self.panels.current;
|
||||
let daemon = self.daemon.clone();
|
||||
// These are the panels to update with the cache.
|
||||
let mut panels = [(&mut self.panels.home, Menu::Home)];
|
||||
let mut panels = [(&mut self.panels.home as &mut dyn State, Menu::Home)];
|
||||
let commands: Vec<_> = panels
|
||||
.iter_mut()
|
||||
.map(|(panel, menu)| {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user