dave: give dave a new home in the sidebar

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-03-26 16:30:37 -07:00
parent 627c3ba9b3
commit b8e2a16e3b
5 changed files with 118 additions and 54 deletions

View File

@@ -0,0 +1,19 @@
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),
}
}
}