dave: bubble note actions to chrome

This allows chrome to pass note actions to other apps
This commit is contained in:
William Casarin
2025-04-22 18:42:12 -07:00
parent 4cedea9fdb
commit e8a1233174
15 changed files with 227 additions and 59 deletions

View File

@@ -60,7 +60,7 @@ mod preview {
};
use super::EditDeckView;
use notedeck::{App, AppContext};
use notedeck::{App, AppAction, AppContext};
pub struct EditDeckPreview {
state: DeckState,
@@ -75,8 +75,13 @@ mod preview {
}
impl App for EditDeckPreview {
fn update(&mut self, _app_ctx: &mut AppContext<'_>, ui: &mut egui::Ui) {
fn update(
&mut self,
_app_ctx: &mut AppContext<'_>,
ui: &mut egui::Ui,
) -> Option<AppAction> {
EditDeckView::new(&mut self.state).ui(ui);
None
}
}