Files
notedeck/crates/notedeck_chrome/src/app.rs
William Casarin b8e2a16e3b dave: give dave a new home in the sidebar
Signed-off-by: William Casarin <jb55@jb55.com>
2025-04-14 11:29:03 -07:00

20 lines
517 B
Rust

use notedeck::AppContext;
use notedeck_columns::Damus;
use notedeck_dave::Dave;
pub enum NotedeckApp {
Dave(Dave),
Columns(Damus),
Other(Box<dyn notedeck::App>),
}
impl notedeck::App for NotedeckApp {
fn update(&mut self, ctx: &mut AppContext, ui: &mut egui::Ui) {
match self {
NotedeckApp::Dave(dave) => dave.update(ctx, ui),
NotedeckApp::Columns(columns) => columns.update(ctx, ui),
NotedeckApp::Other(other) => other.update(ctx, ui),
}
}
}