refactor: treat as dyn state to easily add others

Otherwise, all elements are expected to be `Home`.
This commit is contained in:
Michael Mallan 2025-01-10 15:39:28 +00:00
parent dbfbad7f5a
commit 65e002dc52
No known key found for this signature in database
GPG Key ID: 5177CDCEDB0EABEB

View File

@ -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)| {